diff options
author | Harvey Harrison <harvey.harrison@gmail.com> | 2008-11-27 03:12:47 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-27 03:12:47 -0500 |
commit | c4106aa88a440430d387e022f2ad6dc1e0d52e98 (patch) | |
tree | 09064e6e767301ca28357ed5125e99123f5beaca /net/decnet/dn_nsp_out.c | |
parent | 5b9ab2ec04ec1e1e53939768805612ac191d7ba2 (diff) |
decnet: remove private wrappers of endian helpers
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Reviewed-by: Steven Whitehouse <swhiteho@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/decnet/dn_nsp_out.c')
-rw-r--r-- | net/decnet/dn_nsp_out.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/net/decnet/dn_nsp_out.c b/net/decnet/dn_nsp_out.c index 81a40ff10088..2013c25b7f5a 100644 --- a/net/decnet/dn_nsp_out.c +++ b/net/decnet/dn_nsp_out.c | |||
@@ -325,8 +325,8 @@ static __le16 *dn_mk_ack_header(struct sock *sk, struct sk_buff *skb, unsigned c | |||
325 | 325 | ||
326 | ptr = (__le16 *)dn_mk_common_header(scp, skb, msgflag, hlen); | 326 | ptr = (__le16 *)dn_mk_common_header(scp, skb, msgflag, hlen); |
327 | 327 | ||
328 | *ptr++ = dn_htons(acknum); | 328 | *ptr++ = cpu_to_le16(acknum); |
329 | *ptr++ = dn_htons(ackcrs); | 329 | *ptr++ = cpu_to_le16(ackcrs); |
330 | 330 | ||
331 | return ptr; | 331 | return ptr; |
332 | } | 332 | } |
@@ -344,7 +344,7 @@ static __le16 *dn_nsp_mk_data_header(struct sock *sk, struct sk_buff *skb, int o | |||
344 | cb->segnum = scp->numdat; | 344 | cb->segnum = scp->numdat; |
345 | seq_add(&scp->numdat, 1); | 345 | seq_add(&scp->numdat, 1); |
346 | } | 346 | } |
347 | *(ptr++) = dn_htons(cb->segnum); | 347 | *(ptr++) = cpu_to_le16(cb->segnum); |
348 | 348 | ||
349 | return ptr; | 349 | return ptr; |
350 | } | 350 | } |
@@ -522,7 +522,7 @@ void dn_send_conn_conf(struct sock *sk, gfp_t gfp) | |||
522 | struct dn_scp *scp = DN_SK(sk); | 522 | struct dn_scp *scp = DN_SK(sk); |
523 | struct sk_buff *skb = NULL; | 523 | struct sk_buff *skb = NULL; |
524 | struct nsp_conn_init_msg *msg; | 524 | struct nsp_conn_init_msg *msg; |
525 | __u8 len = (__u8)dn_ntohs(scp->conndata_out.opt_optl); | 525 | __u8 len = (__u8)le16_to_cpu(scp->conndata_out.opt_optl); |
526 | 526 | ||
527 | if ((skb = dn_alloc_skb(sk, 50 + len, gfp)) == NULL) | 527 | if ((skb = dn_alloc_skb(sk, 50 + len, gfp)) == NULL) |
528 | return; | 528 | return; |
@@ -533,7 +533,7 @@ void dn_send_conn_conf(struct sock *sk, gfp_t gfp) | |||
533 | msg->srcaddr = scp->addrloc; | 533 | msg->srcaddr = scp->addrloc; |
534 | msg->services = scp->services_loc; | 534 | msg->services = scp->services_loc; |
535 | msg->info = scp->info_loc; | 535 | msg->info = scp->info_loc; |
536 | msg->segsize = dn_htons(scp->segsize_loc); | 536 | msg->segsize = cpu_to_le16(scp->segsize_loc); |
537 | 537 | ||
538 | *skb_put(skb,1) = len; | 538 | *skb_put(skb,1) = len; |
539 | 539 | ||
@@ -559,7 +559,7 @@ static __inline__ void dn_nsp_do_disc(struct sock *sk, unsigned char msgflg, | |||
559 | 559 | ||
560 | if ((dst == NULL) || (rem == 0)) { | 560 | if ((dst == NULL) || (rem == 0)) { |
561 | if (net_ratelimit()) | 561 | if (net_ratelimit()) |
562 | printk(KERN_DEBUG "DECnet: dn_nsp_do_disc: BUG! Please report this to SteveW@ACM.org rem=%u dst=%p\n", dn_ntohs(rem), dst); | 562 | printk(KERN_DEBUG "DECnet: dn_nsp_do_disc: BUG! Please report this to SteveW@ACM.org rem=%u dst=%p\n", le16_to_cpu(rem), dst); |
563 | return; | 563 | return; |
564 | } | 564 | } |
565 | 565 | ||
@@ -572,7 +572,7 @@ static __inline__ void dn_nsp_do_disc(struct sock *sk, unsigned char msgflg, | |||
572 | msg += 2; | 572 | msg += 2; |
573 | *(__le16 *)msg = loc; | 573 | *(__le16 *)msg = loc; |
574 | msg += 2; | 574 | msg += 2; |
575 | *(__le16 *)msg = dn_htons(reason); | 575 | *(__le16 *)msg = cpu_to_le16(reason); |
576 | msg += 2; | 576 | msg += 2; |
577 | if (msgflg == NSP_DISCINIT) | 577 | if (msgflg == NSP_DISCINIT) |
578 | *msg++ = ddl; | 578 | *msg++ = ddl; |
@@ -598,10 +598,10 @@ void dn_nsp_send_disc(struct sock *sk, unsigned char msgflg, | |||
598 | int ddl = 0; | 598 | int ddl = 0; |
599 | 599 | ||
600 | if (msgflg == NSP_DISCINIT) | 600 | if (msgflg == NSP_DISCINIT) |
601 | ddl = dn_ntohs(scp->discdata_out.opt_optl); | 601 | ddl = le16_to_cpu(scp->discdata_out.opt_optl); |
602 | 602 | ||
603 | if (reason == 0) | 603 | if (reason == 0) |
604 | reason = dn_ntohs(scp->discdata_out.opt_status); | 604 | reason = le16_to_cpu(scp->discdata_out.opt_status); |
605 | 605 | ||
606 | dn_nsp_do_disc(sk, msgflg, reason, gfp, sk->sk_dst_cache, ddl, | 606 | dn_nsp_do_disc(sk, msgflg, reason, gfp, sk->sk_dst_cache, ddl, |
607 | scp->discdata_out.opt_data, scp->addrrem, scp->addrloc); | 607 | scp->discdata_out.opt_data, scp->addrrem, scp->addrloc); |
@@ -675,7 +675,7 @@ void dn_nsp_send_conninit(struct sock *sk, unsigned char msgflg) | |||
675 | msg->srcaddr = scp->addrloc; | 675 | msg->srcaddr = scp->addrloc; |
676 | msg->services = scp->services_loc; /* Requested flow control */ | 676 | msg->services = scp->services_loc; /* Requested flow control */ |
677 | msg->info = scp->info_loc; /* Version Number */ | 677 | msg->info = scp->info_loc; /* Version Number */ |
678 | msg->segsize = dn_htons(scp->segsize_loc); /* Max segment size */ | 678 | msg->segsize = cpu_to_le16(scp->segsize_loc); /* Max segment size */ |
679 | 679 | ||
680 | if (scp->peer.sdn_objnum) | 680 | if (scp->peer.sdn_objnum) |
681 | type = 0; | 681 | type = 0; |
@@ -708,7 +708,7 @@ void dn_nsp_send_conninit(struct sock *sk, unsigned char msgflg) | |||
708 | if (aux > 0) | 708 | if (aux > 0) |
709 | memcpy(skb_put(skb, aux), scp->accessdata.acc_acc, aux); | 709 | memcpy(skb_put(skb, aux), scp->accessdata.acc_acc, aux); |
710 | 710 | ||
711 | aux = (__u8)dn_ntohs(scp->conndata_out.opt_optl); | 711 | aux = (__u8)le16_to_cpu(scp->conndata_out.opt_optl); |
712 | *skb_put(skb, 1) = aux; | 712 | *skb_put(skb, 1) = aux; |
713 | if (aux > 0) | 713 | if (aux > 0) |
714 | memcpy(skb_put(skb,aux), scp->conndata_out.opt_data, aux); | 714 | memcpy(skb_put(skb,aux), scp->conndata_out.opt_data, aux); |