Commit 09640e6365c679b5642b1c41b6d7078f51689ddf
Committed by
David S. Miller
1 parent
ee437770c4
Exists in
master
and in
39 other branches
net: replace uses of __constant_{endian}
Base versions handle constant folding now. Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Showing 61 changed files with 111 additions and 112 deletions Side-by-side Diff
- drivers/net/arcnet/arc-rawmode.c
- drivers/net/arcnet/capmode.c
- drivers/net/bonding/bond_3ad.h
- drivers/net/bonding/bond_alb.c
- drivers/net/e1000/e1000_main.c
- drivers/net/e1000e/netdev.c
- drivers/net/enic/enic_main.c
- drivers/net/hamachi.c
- drivers/net/hamradio/bpqether.c
- drivers/net/igb/igb_main.c
- drivers/net/ixgbe/ixgbe_main.c
- drivers/net/myri_sbus.c
- drivers/net/netxen/netxen_nic_main.c
- drivers/net/niu.c
- drivers/net/pppoe.c
- drivers/net/ps3_gelic_net.c
- drivers/net/sfc/bitfield.h
- drivers/net/tun.c
- drivers/net/usb/hso.c
- drivers/net/via-velocity.h
- drivers/net/wan/hdlc.c
- drivers/net/wan/hdlc_cisco.c
- drivers/net/wan/hdlc_fr.c
- drivers/net/wan/hdlc_ppp.c
- drivers/net/wan/hdlc_raw.c
- drivers/net/wan/lapbether.c
- net/802/psnap.c
- net/8021q/vlan.c
- net/appletalk/ddp.c
- net/ax25/af_ax25.c
- net/bridge/br_netfilter.c
- net/can/af_can.c
- net/decnet/af_decnet.c
- net/decnet/dn_route.c
- net/dsa/mv88e6123_61_65.c
- net/dsa/mv88e6131.c
- net/dsa/tag_dsa.c
- net/dsa/tag_edsa.c
- net/dsa/tag_trailer.c
- net/econet/af_econet.c
- net/ipv4/af_inet.c
- net/ipv4/arp.c
- net/ipv4/ipconfig.c
- net/ipv4/netfilter/nf_nat_snmp_basic.c
- net/ipv4/route.c
- net/ipv4/xfrm4_policy.c
- net/ipv6/af_inet6.c
- net/ipv6/route.c
- net/ipv6/xfrm6_policy.c
- net/ipx/af_ipx.c
- net/irda/irmod.c
- net/llc/llc_core.c
- net/netfilter/ipvs/ip_vs_sync.c
- net/netfilter/nf_conntrack_amanda.c
- net/netfilter/nf_conntrack_h323_main.c
- net/netfilter/nf_conntrack_netbios_ns.c
- net/netfilter/nf_conntrack_pptp.c
- net/phonet/af_phonet.c
- net/sctp/output.c
- net/sctp/sm_make_chunk.c
- net/x25/af_x25.c
drivers/net/arcnet/arc-rawmode.c
drivers/net/arcnet/capmode.c
... | ... | @@ -148,7 +148,7 @@ |
148 | 148 | |
149 | 149 | BUGLVL(D_SKB) arcnet_dump_skb(dev, skb, "rx"); |
150 | 150 | |
151 | - skb->protocol = __constant_htons(ETH_P_ARCNET); | |
151 | + skb->protocol = cpu_to_be16(ETH_P_ARCNET); | |
152 | 152 | ; |
153 | 153 | netif_rx(skb); |
154 | 154 | } |
... | ... | @@ -282,7 +282,7 @@ |
282 | 282 | BUGMSG(D_PROTO, "Ackknowledge for cap packet %x.\n", |
283 | 283 | *((int*)&ackpkt->soft.cap.cookie[0])); |
284 | 284 | |
285 | - ackskb->protocol = __constant_htons(ETH_P_ARCNET); | |
285 | + ackskb->protocol = cpu_to_be16(ETH_P_ARCNET); | |
286 | 286 | |
287 | 287 | BUGLVL(D_SKB) arcnet_dump_skb(dev, ackskb, "ack_tx_recv"); |
288 | 288 | netif_rx(ackskb); |
drivers/net/bonding/bond_3ad.h
... | ... | @@ -29,7 +29,7 @@ |
29 | 29 | |
30 | 30 | // General definitions |
31 | 31 | #define BOND_ETH_P_LACPDU 0x8809 |
32 | -#define PKT_TYPE_LACPDU __constant_htons(BOND_ETH_P_LACPDU) | |
32 | +#define PKT_TYPE_LACPDU cpu_to_be16(BOND_ETH_P_LACPDU) | |
33 | 33 | #define AD_TIMER_INTERVAL 100 /*msec*/ |
34 | 34 | |
35 | 35 | #define MULTICAST_LACPDU_ADDR {0x01, 0x80, 0xC2, 0x00, 0x00, 0x02} |
drivers/net/bonding/bond_alb.c
... | ... | @@ -822,7 +822,7 @@ |
822 | 822 | _unlock_rx_hashtbl(bond); |
823 | 823 | |
824 | 824 | /*initialize packet type*/ |
825 | - pk_type->type = __constant_htons(ETH_P_ARP); | |
825 | + pk_type->type = cpu_to_be16(ETH_P_ARP); | |
826 | 826 | pk_type->dev = NULL; |
827 | 827 | pk_type->func = rlb_arp_recv; |
828 | 828 | |
... | ... | @@ -892,7 +892,7 @@ |
892 | 892 | memset(&pkt, 0, size); |
893 | 893 | memcpy(pkt.mac_dst, mac_addr, ETH_ALEN); |
894 | 894 | memcpy(pkt.mac_src, mac_addr, ETH_ALEN); |
895 | - pkt.type = __constant_htons(ETH_P_LOOP); | |
895 | + pkt.type = cpu_to_be16(ETH_P_LOOP); | |
896 | 896 | |
897 | 897 | for (i = 0; i < MAX_LP_BURST; i++) { |
898 | 898 | struct sk_buff *skb; |
drivers/net/e1000/e1000_main.c
... | ... | @@ -2860,11 +2860,11 @@ |
2860 | 2860 | return false; |
2861 | 2861 | |
2862 | 2862 | switch (skb->protocol) { |
2863 | - case __constant_htons(ETH_P_IP): | |
2863 | + case cpu_to_be16(ETH_P_IP): | |
2864 | 2864 | if (ip_hdr(skb)->protocol == IPPROTO_TCP) |
2865 | 2865 | cmd_len |= E1000_TXD_CMD_TCP; |
2866 | 2866 | break; |
2867 | - case __constant_htons(ETH_P_IPV6): | |
2867 | + case cpu_to_be16(ETH_P_IPV6): | |
2868 | 2868 | /* XXX not handling all IPV6 headers */ |
2869 | 2869 | if (ipv6_hdr(skb)->nexthdr == IPPROTO_TCP) |
2870 | 2870 | cmd_len |= E1000_TXD_CMD_TCP; |
drivers/net/e1000e/netdev.c
... | ... | @@ -3770,11 +3770,11 @@ |
3770 | 3770 | return 0; |
3771 | 3771 | |
3772 | 3772 | switch (skb->protocol) { |
3773 | - case __constant_htons(ETH_P_IP): | |
3773 | + case cpu_to_be16(ETH_P_IP): | |
3774 | 3774 | if (ip_hdr(skb)->protocol == IPPROTO_TCP) |
3775 | 3775 | cmd_len |= E1000_TXD_CMD_TCP; |
3776 | 3776 | break; |
3777 | - case __constant_htons(ETH_P_IPV6): | |
3777 | + case cpu_to_be16(ETH_P_IPV6): | |
3778 | 3778 | /* XXX not handling all IPV6 headers */ |
3779 | 3779 | if (ipv6_hdr(skb)->nexthdr == IPPROTO_TCP) |
3780 | 3780 | cmd_len |= E1000_TXD_CMD_TCP; |
drivers/net/enic/enic_main.c
... | ... | @@ -570,11 +570,11 @@ |
570 | 570 | * to each TCP segment resulting from the TSO. |
571 | 571 | */ |
572 | 572 | |
573 | - if (skb->protocol == __constant_htons(ETH_P_IP)) { | |
573 | + if (skb->protocol == cpu_to_be16(ETH_P_IP)) { | |
574 | 574 | ip_hdr(skb)->check = 0; |
575 | 575 | tcp_hdr(skb)->check = ~csum_tcpudp_magic(ip_hdr(skb)->saddr, |
576 | 576 | ip_hdr(skb)->daddr, 0, IPPROTO_TCP, 0); |
577 | - } else if (skb->protocol == __constant_htons(ETH_P_IPV6)) { | |
577 | + } else if (skb->protocol == cpu_to_be16(ETH_P_IPV6)) { | |
578 | 578 | tcp_hdr(skb)->check = ~csum_ipv6_magic(&ipv6_hdr(skb)->saddr, |
579 | 579 | &ipv6_hdr(skb)->daddr, 0, IPPROTO_TCP, 0); |
580 | 580 | } |
drivers/net/hamachi.c
... | ... | @@ -1244,7 +1244,7 @@ |
1244 | 1244 | csum_add(sum, (ih)->saddr & 0xffff); \ |
1245 | 1245 | csum_add(sum, (ih)->daddr >> 16); \ |
1246 | 1246 | csum_add(sum, (ih)->daddr & 0xffff); \ |
1247 | - csum_add(sum, __constant_htons(IPPROTO_UDP)); \ | |
1247 | + csum_add(sum, cpu_to_be16(IPPROTO_UDP)); \ | |
1248 | 1248 | csum_add(sum, (uh)->len); \ |
1249 | 1249 | } while (0) |
1250 | 1250 | |
... | ... | @@ -1255,7 +1255,7 @@ |
1255 | 1255 | csum_add(sum, (ih)->saddr & 0xffff); \ |
1256 | 1256 | csum_add(sum, (ih)->daddr >> 16); \ |
1257 | 1257 | csum_add(sum, (ih)->daddr & 0xffff); \ |
1258 | - csum_add(sum, __constant_htons(IPPROTO_TCP)); \ | |
1258 | + csum_add(sum, cpu_to_be16(IPPROTO_TCP)); \ | |
1259 | 1259 | csum_add(sum, htons(len)); \ |
1260 | 1260 | } while (0) |
1261 | 1261 | #endif |
... | ... | @@ -1296,7 +1296,7 @@ |
1296 | 1296 | /* tack on checksum tag */ |
1297 | 1297 | u32 tagval = 0; |
1298 | 1298 | struct ethhdr *eh = (struct ethhdr *)skb->data; |
1299 | - if (eh->h_proto == __constant_htons(ETH_P_IP)) { | |
1299 | + if (eh->h_proto == cpu_to_be16(ETH_P_IP)) { | |
1300 | 1300 | struct iphdr *ih = (struct iphdr *)((char *)eh + ETH_HLEN); |
1301 | 1301 | if (ih->protocol == IPPROTO_UDP) { |
1302 | 1302 | struct udphdr *uh |
... | ... | @@ -1605,7 +1605,7 @@ |
1605 | 1605 | */ |
1606 | 1606 | if (ntohs(ih->tot_len) >= 46){ |
1607 | 1607 | /* don't worry about frags */ |
1608 | - if (!(ih->frag_off & __constant_htons(IP_MF|IP_OFFSET))) { | |
1608 | + if (!(ih->frag_off & cpu_to_be16(IP_MF|IP_OFFSET))) { | |
1609 | 1609 | u32 inv = *(u32 *) &buf_addr[data_size - 16]; |
1610 | 1610 | u32 *p = (u32 *) &buf_addr[data_size - 20]; |
1611 | 1611 | register u32 crc, p_r, p_r1; |
drivers/net/hamradio/bpqether.c
drivers/net/igb/igb_main.c
... | ... | @@ -2749,12 +2749,12 @@ |
2749 | 2749 | |
2750 | 2750 | if (skb->ip_summed == CHECKSUM_PARTIAL) { |
2751 | 2751 | switch (skb->protocol) { |
2752 | - case __constant_htons(ETH_P_IP): | |
2752 | + case cpu_to_be16(ETH_P_IP): | |
2753 | 2753 | tu_cmd |= E1000_ADVTXD_TUCMD_IPV4; |
2754 | 2754 | if (ip_hdr(skb)->protocol == IPPROTO_TCP) |
2755 | 2755 | tu_cmd |= E1000_ADVTXD_TUCMD_L4T_TCP; |
2756 | 2756 | break; |
2757 | - case __constant_htons(ETH_P_IPV6): | |
2757 | + case cpu_to_be16(ETH_P_IPV6): | |
2758 | 2758 | /* XXX what about other V6 headers?? */ |
2759 | 2759 | if (ipv6_hdr(skb)->nexthdr == IPPROTO_TCP) |
2760 | 2760 | tu_cmd |= E1000_ADVTXD_TUCMD_L4T_TCP; |
drivers/net/ixgbe/ixgbe_main.c
... | ... | @@ -3567,13 +3567,13 @@ |
3567 | 3567 | |
3568 | 3568 | if (skb->ip_summed == CHECKSUM_PARTIAL) { |
3569 | 3569 | switch (skb->protocol) { |
3570 | - case __constant_htons(ETH_P_IP): | |
3570 | + case cpu_to_be16(ETH_P_IP): | |
3571 | 3571 | type_tucmd_mlhl |= IXGBE_ADVTXD_TUCMD_IPV4; |
3572 | 3572 | if (ip_hdr(skb)->protocol == IPPROTO_TCP) |
3573 | 3573 | type_tucmd_mlhl |= |
3574 | 3574 | IXGBE_ADVTXD_TUCMD_L4T_TCP; |
3575 | 3575 | break; |
3576 | - case __constant_htons(ETH_P_IPV6): | |
3576 | + case cpu_to_be16(ETH_P_IPV6): | |
3577 | 3577 | /* XXX what about other V6 headers?? */ |
3578 | 3578 | if (ipv6_hdr(skb)->nexthdr == IPPROTO_TCP) |
3579 | 3579 | type_tucmd_mlhl |= |
drivers/net/myri_sbus.c
drivers/net/netxen/netxen_nic_main.c
... | ... | @@ -1170,7 +1170,7 @@ |
1170 | 1170 | __be16 protocol = skb->protocol; |
1171 | 1171 | u16 flags = 0; |
1172 | 1172 | |
1173 | - if (protocol == __constant_htons(ETH_P_8021Q)) { | |
1173 | + if (protocol == cpu_to_be16(ETH_P_8021Q)) { | |
1174 | 1174 | struct vlan_ethhdr *vh = (struct vlan_ethhdr *)skb->data; |
1175 | 1175 | protocol = vh->h_vlan_encapsulated_proto; |
1176 | 1176 | flags = FLAGS_VLAN_TAGGED; |
1177 | 1177 | |
1178 | 1178 | |
... | ... | @@ -1183,21 +1183,21 @@ |
1183 | 1183 | desc->total_hdr_length = |
1184 | 1184 | skb_transport_offset(skb) + tcp_hdrlen(skb); |
1185 | 1185 | |
1186 | - opcode = (protocol == __constant_htons(ETH_P_IPV6)) ? | |
1186 | + opcode = (protocol == cpu_to_be16(ETH_P_IPV6)) ? | |
1187 | 1187 | TX_TCP_LSO6 : TX_TCP_LSO; |
1188 | 1188 | tso = true; |
1189 | 1189 | |
1190 | 1190 | } else if (skb->ip_summed == CHECKSUM_PARTIAL) { |
1191 | 1191 | u8 l4proto; |
1192 | 1192 | |
1193 | - if (protocol == __constant_htons(ETH_P_IP)) { | |
1193 | + if (protocol == cpu_to_be16(ETH_P_IP)) { | |
1194 | 1194 | l4proto = ip_hdr(skb)->protocol; |
1195 | 1195 | |
1196 | 1196 | if (l4proto == IPPROTO_TCP) |
1197 | 1197 | opcode = TX_TCP_PKT; |
1198 | 1198 | else if(l4proto == IPPROTO_UDP) |
1199 | 1199 | opcode = TX_UDP_PKT; |
1200 | - } else if (protocol == __constant_htons(ETH_P_IPV6)) { | |
1200 | + } else if (protocol == cpu_to_be16(ETH_P_IPV6)) { | |
1201 | 1201 | l4proto = ipv6_hdr(skb)->nexthdr; |
1202 | 1202 | |
1203 | 1203 | if (l4proto == IPPROTO_TCP) |
drivers/net/niu.c
... | ... | @@ -6447,11 +6447,11 @@ |
6447 | 6447 | |
6448 | 6448 | ipv6 = ihl = 0; |
6449 | 6449 | switch (skb->protocol) { |
6450 | - case __constant_htons(ETH_P_IP): | |
6450 | + case cpu_to_be16(ETH_P_IP): | |
6451 | 6451 | ip_proto = ip_hdr(skb)->protocol; |
6452 | 6452 | ihl = ip_hdr(skb)->ihl; |
6453 | 6453 | break; |
6454 | - case __constant_htons(ETH_P_IPV6): | |
6454 | + case cpu_to_be16(ETH_P_IPV6): | |
6455 | 6455 | ip_proto = ipv6_hdr(skb)->nexthdr; |
6456 | 6456 | ihl = (40 >> 2); |
6457 | 6457 | ipv6 = 1; |
drivers/net/pppoe.c
... | ... | @@ -514,12 +514,12 @@ |
514 | 514 | } |
515 | 515 | |
516 | 516 | static struct packet_type pppoes_ptype = { |
517 | - .type = __constant_htons(ETH_P_PPP_SES), | |
517 | + .type = cpu_to_be16(ETH_P_PPP_SES), | |
518 | 518 | .func = pppoe_rcv, |
519 | 519 | }; |
520 | 520 | |
521 | 521 | static struct packet_type pppoed_ptype = { |
522 | - .type = __constant_htons(ETH_P_PPP_DISC), | |
522 | + .type = cpu_to_be16(ETH_P_PPP_DISC), | |
523 | 523 | .func = pppoe_disc_rcv, |
524 | 524 | }; |
525 | 525 | |
... | ... | @@ -877,7 +877,7 @@ |
877 | 877 | skb->dev = dev; |
878 | 878 | |
879 | 879 | skb->priority = sk->sk_priority; |
880 | - skb->protocol = __constant_htons(ETH_P_PPP_SES); | |
880 | + skb->protocol = cpu_to_be16(ETH_P_PPP_SES); | |
881 | 881 | |
882 | 882 | ph = (struct pppoe_hdr *)skb_put(skb, total_len + sizeof(struct pppoe_hdr)); |
883 | 883 | start = (char *)&ph->tag[0]; |
... | ... | @@ -937,7 +937,7 @@ |
937 | 937 | ph->sid = po->num; |
938 | 938 | ph->length = htons(data_len); |
939 | 939 | |
940 | - skb->protocol = __constant_htons(ETH_P_PPP_SES); | |
940 | + skb->protocol = cpu_to_be16(ETH_P_PPP_SES); | |
941 | 941 | skb->dev = dev; |
942 | 942 | |
943 | 943 | dev_hard_header(skb, dev, ETH_P_PPP_SES, |
drivers/net/ps3_gelic_net.c
... | ... | @@ -745,7 +745,7 @@ |
745 | 745 | /* Move the mac addresses to the top of buffer */ |
746 | 746 | memmove(skb->data, skb->data + VLAN_HLEN, 2 * ETH_ALEN); |
747 | 747 | |
748 | - veth->h_vlan_proto = __constant_htons(ETH_P_8021Q); | |
748 | + veth->h_vlan_proto = cpu_to_be16(ETH_P_8021Q); | |
749 | 749 | veth->h_vlan_TCI = htons(tag); |
750 | 750 | |
751 | 751 | return skb; |
drivers/net/sfc/bitfield.h
... | ... | @@ -543,8 +543,8 @@ |
543 | 543 | |
544 | 544 | /* Static initialiser */ |
545 | 545 | #define EFX_OWORD32(a, b, c, d) \ |
546 | - { .u32 = { __constant_cpu_to_le32(a), __constant_cpu_to_le32(b), \ | |
547 | - __constant_cpu_to_le32(c), __constant_cpu_to_le32(d) } } | |
546 | + { .u32 = { cpu_to_le32(a), cpu_to_le32(b), \ | |
547 | + cpu_to_le32(c), cpu_to_le32(d) } } | |
548 | 548 | |
549 | 549 | #endif /* EFX_BITFIELD_H */ |
drivers/net/tun.c
... | ... | @@ -543,7 +543,7 @@ |
543 | 543 | /* Get packet from user space buffer */ |
544 | 544 | static __inline__ ssize_t tun_get_user(struct tun_struct *tun, struct iovec *iv, size_t count) |
545 | 545 | { |
546 | - struct tun_pi pi = { 0, __constant_htons(ETH_P_IP) }; | |
546 | + struct tun_pi pi = { 0, cpu_to_be16(ETH_P_IP) }; | |
547 | 547 | struct sk_buff *skb; |
548 | 548 | size_t len = count, align = 0; |
549 | 549 | struct virtio_net_hdr gso = { 0 }; |
drivers/net/usb/hso.c
... | ... | @@ -934,8 +934,7 @@ |
934 | 934 | if (!odev->rx_buf_missing) { |
935 | 935 | /* Packet is complete. Inject into stack. */ |
936 | 936 | /* We have IP packet here */ |
937 | - odev->skb_rx_buf->protocol = | |
938 | - __constant_htons(ETH_P_IP); | |
937 | + odev->skb_rx_buf->protocol = cpu_to_be16(ETH_P_IP); | |
939 | 938 | /* don't check it */ |
940 | 939 | odev->skb_rx_buf->ip_summed = |
941 | 940 | CHECKSUM_UNNECESSARY; |
drivers/net/via-velocity.h
... | ... | @@ -183,7 +183,7 @@ |
183 | 183 | }; |
184 | 184 | |
185 | 185 | enum { |
186 | - RX_INTEN = __constant_cpu_to_le16(0x8000) | |
186 | + RX_INTEN = cpu_to_le16(0x8000) | |
187 | 187 | }; |
188 | 188 | |
189 | 189 | struct rx_desc { |
... | ... | @@ -210,7 +210,7 @@ |
210 | 210 | } __attribute__ ((__packed__)); |
211 | 211 | |
212 | 212 | enum { |
213 | - TD_QUEUE = __constant_cpu_to_le16(0x8000) | |
213 | + TD_QUEUE = cpu_to_le16(0x8000) | |
214 | 214 | }; |
215 | 215 | |
216 | 216 | struct td_buf { |
... | ... | @@ -242,7 +242,7 @@ |
242 | 242 | |
243 | 243 | enum velocity_owner { |
244 | 244 | OWNED_BY_HOST = 0, |
245 | - OWNED_BY_NIC = __constant_cpu_to_le16(0x8000) | |
245 | + OWNED_BY_NIC = cpu_to_le16(0x8000) | |
246 | 246 | }; |
247 | 247 | |
248 | 248 |
drivers/net/wan/hdlc.c
drivers/net/wan/hdlc_cisco.c
... | ... | @@ -117,7 +117,7 @@ |
117 | 117 | data->type = htonl(type); |
118 | 118 | data->par1 = par1; |
119 | 119 | data->par2 = par2; |
120 | - data->rel = __constant_htons(0xFFFF); | |
120 | + data->rel = cpu_to_be16(0xFFFF); | |
121 | 121 | /* we will need do_div here if 1000 % HZ != 0 */ |
122 | 122 | data->time = htonl((jiffies - INITIAL_JIFFIES) * (1000 / HZ)); |
123 | 123 | |
124 | 124 | |
125 | 125 | |
126 | 126 | |
... | ... | @@ -136,20 +136,20 @@ |
136 | 136 | struct hdlc_header *data = (struct hdlc_header*)skb->data; |
137 | 137 | |
138 | 138 | if (skb->len < sizeof(struct hdlc_header)) |
139 | - return __constant_htons(ETH_P_HDLC); | |
139 | + return cpu_to_be16(ETH_P_HDLC); | |
140 | 140 | |
141 | 141 | if (data->address != CISCO_MULTICAST && |
142 | 142 | data->address != CISCO_UNICAST) |
143 | - return __constant_htons(ETH_P_HDLC); | |
143 | + return cpu_to_be16(ETH_P_HDLC); | |
144 | 144 | |
145 | 145 | switch(data->protocol) { |
146 | - case __constant_htons(ETH_P_IP): | |
147 | - case __constant_htons(ETH_P_IPX): | |
148 | - case __constant_htons(ETH_P_IPV6): | |
146 | + case cpu_to_be16(ETH_P_IP): | |
147 | + case cpu_to_be16(ETH_P_IPX): | |
148 | + case cpu_to_be16(ETH_P_IPV6): | |
149 | 149 | skb_pull(skb, sizeof(struct hdlc_header)); |
150 | 150 | return data->protocol; |
151 | 151 | default: |
152 | - return __constant_htons(ETH_P_HDLC); | |
152 | + return cpu_to_be16(ETH_P_HDLC); | |
153 | 153 | } |
154 | 154 | } |
155 | 155 | |
... | ... | @@ -194,7 +194,7 @@ |
194 | 194 | case CISCO_ADDR_REQ: /* Stolen from syncppp.c :-) */ |
195 | 195 | in_dev = dev->ip_ptr; |
196 | 196 | addr = 0; |
197 | - mask = __constant_htonl(~0); /* is the mask correct? */ | |
197 | + mask = ~cpu_to_be32(0); /* is the mask correct? */ | |
198 | 198 | |
199 | 199 | if (in_dev != NULL) { |
200 | 200 | struct in_ifaddr **ifap = &in_dev->ifa_list; |
drivers/net/wan/hdlc_fr.c
... | ... | @@ -278,31 +278,31 @@ |
278 | 278 | struct sk_buff *skb = *skb_p; |
279 | 279 | |
280 | 280 | switch (skb->protocol) { |
281 | - case __constant_htons(NLPID_CCITT_ANSI_LMI): | |
281 | + case cpu_to_be16(NLPID_CCITT_ANSI_LMI): | |
282 | 282 | head_len = 4; |
283 | 283 | skb_push(skb, head_len); |
284 | 284 | skb->data[3] = NLPID_CCITT_ANSI_LMI; |
285 | 285 | break; |
286 | 286 | |
287 | - case __constant_htons(NLPID_CISCO_LMI): | |
287 | + case cpu_to_be16(NLPID_CISCO_LMI): | |
288 | 288 | head_len = 4; |
289 | 289 | skb_push(skb, head_len); |
290 | 290 | skb->data[3] = NLPID_CISCO_LMI; |
291 | 291 | break; |
292 | 292 | |
293 | - case __constant_htons(ETH_P_IP): | |
293 | + case cpu_to_be16(ETH_P_IP): | |
294 | 294 | head_len = 4; |
295 | 295 | skb_push(skb, head_len); |
296 | 296 | skb->data[3] = NLPID_IP; |
297 | 297 | break; |
298 | 298 | |
299 | - case __constant_htons(ETH_P_IPV6): | |
299 | + case cpu_to_be16(ETH_P_IPV6): | |
300 | 300 | head_len = 4; |
301 | 301 | skb_push(skb, head_len); |
302 | 302 | skb->data[3] = NLPID_IPV6; |
303 | 303 | break; |
304 | 304 | |
305 | - case __constant_htons(ETH_P_802_3): | |
305 | + case cpu_to_be16(ETH_P_802_3): | |
306 | 306 | head_len = 10; |
307 | 307 | if (skb_headroom(skb) < head_len) { |
308 | 308 | struct sk_buff *skb2 = skb_realloc_headroom(skb, |
... | ... | @@ -426,7 +426,7 @@ |
426 | 426 | skb_put(skb, pad); |
427 | 427 | memset(skb->data + len, 0, pad); |
428 | 428 | } |
429 | - skb->protocol = __constant_htons(ETH_P_802_3); | |
429 | + skb->protocol = cpu_to_be16(ETH_P_802_3); | |
430 | 430 | } |
431 | 431 | if (!fr_hard_header(&skb, pvc->dlci)) { |
432 | 432 | dev->stats.tx_bytes += skb->len; |
433 | 433 | |
... | ... | @@ -496,10 +496,10 @@ |
496 | 496 | memset(skb->data, 0, len); |
497 | 497 | skb_reserve(skb, 4); |
498 | 498 | if (lmi == LMI_CISCO) { |
499 | - skb->protocol = __constant_htons(NLPID_CISCO_LMI); | |
499 | + skb->protocol = cpu_to_be16(NLPID_CISCO_LMI); | |
500 | 500 | fr_hard_header(&skb, LMI_CISCO_DLCI); |
501 | 501 | } else { |
502 | - skb->protocol = __constant_htons(NLPID_CCITT_ANSI_LMI); | |
502 | + skb->protocol = cpu_to_be16(NLPID_CCITT_ANSI_LMI); | |
503 | 503 | fr_hard_header(&skb, LMI_CCITT_ANSI_DLCI); |
504 | 504 | } |
505 | 505 | data = skb_tail_pointer(skb); |
drivers/net/wan/hdlc_ppp.c
... | ... | @@ -150,11 +150,11 @@ |
150 | 150 | return htons(ETH_P_HDLC); |
151 | 151 | |
152 | 152 | switch (data->protocol) { |
153 | - case __constant_htons(PID_IP): | |
153 | + case cpu_to_be16(PID_IP): | |
154 | 154 | skb_pull(skb, sizeof(struct hdlc_header)); |
155 | 155 | return htons(ETH_P_IP); |
156 | 156 | |
157 | - case __constant_htons(PID_IPV6): | |
157 | + case cpu_to_be16(PID_IPV6): | |
158 | 158 | skb_pull(skb, sizeof(struct hdlc_header)); |
159 | 159 | return htons(ETH_P_IPV6); |
160 | 160 |
drivers/net/wan/hdlc_raw.c
drivers/net/wan/lapbether.c
... | ... | @@ -422,7 +422,7 @@ |
422 | 422 | /* ------------------------------------------------------------------------ */ |
423 | 423 | |
424 | 424 | static struct packet_type lapbeth_packet_type = { |
425 | - .type = __constant_htons(ETH_P_DEC), | |
425 | + .type = cpu_to_be16(ETH_P_DEC), | |
426 | 426 | .func = lapbeth_rcv, |
427 | 427 | }; |
428 | 428 |
net/802/psnap.c
net/8021q/vlan.c
... | ... | @@ -52,7 +52,7 @@ |
52 | 52 | static const char vlan_buggyright[] = "David S. Miller <davem@redhat.com>"; |
53 | 53 | |
54 | 54 | static struct packet_type vlan_packet_type = { |
55 | - .type = __constant_htons(ETH_P_8021Q), | |
55 | + .type = cpu_to_be16(ETH_P_8021Q), | |
56 | 56 | .func = vlan_skb_recv, /* VLAN receive method */ |
57 | 57 | }; |
58 | 58 |
net/appletalk/ddp.c
... | ... | @@ -1861,12 +1861,12 @@ |
1861 | 1861 | }; |
1862 | 1862 | |
1863 | 1863 | static struct packet_type ltalk_packet_type = { |
1864 | - .type = __constant_htons(ETH_P_LOCALTALK), | |
1864 | + .type = cpu_to_be16(ETH_P_LOCALTALK), | |
1865 | 1865 | .func = ltalk_rcv, |
1866 | 1866 | }; |
1867 | 1867 | |
1868 | 1868 | static struct packet_type ppptalk_packet_type = { |
1869 | - .type = __constant_htons(ETH_P_PPPTALK), | |
1869 | + .type = cpu_to_be16(ETH_P_PPPTALK), | |
1870 | 1870 | .func = atalk_rcv, |
1871 | 1871 | }; |
1872 | 1872 |
net/ax25/af_ax25.c
... | ... | @@ -1986,7 +1986,7 @@ |
1986 | 1986 | * Called by socket.c on kernel start up |
1987 | 1987 | */ |
1988 | 1988 | static struct packet_type ax25_packet_type = { |
1989 | - .type = __constant_htons(ETH_P_AX25), | |
1989 | + .type = cpu_to_be16(ETH_P_AX25), | |
1990 | 1990 | .dev = NULL, /* All devices */ |
1991 | 1991 | .func = ax25_kiss_rcv, |
1992 | 1992 | }; |
net/bridge/br_netfilter.c
net/can/af_can.c
net/decnet/af_decnet.c
... | ... | @@ -2113,7 +2113,7 @@ |
2113 | 2113 | extern int dn_route_rcv(struct sk_buff *, struct net_device *, struct packet_type *, struct net_device *); |
2114 | 2114 | |
2115 | 2115 | static struct packet_type dn_dix_packet_type = { |
2116 | - .type = __constant_htons(ETH_P_DNA_RT), | |
2116 | + .type = cpu_to_be16(ETH_P_DNA_RT), | |
2117 | 2117 | .dev = NULL, /* All devices */ |
2118 | 2118 | .func = dn_route_rcv, |
2119 | 2119 | }; |
net/decnet/dn_route.c
net/dsa/mv88e6123_61_65.c
... | ... | @@ -394,7 +394,7 @@ |
394 | 394 | } |
395 | 395 | |
396 | 396 | static struct dsa_switch_driver mv88e6123_61_65_switch_driver = { |
397 | - .tag_protocol = __constant_htons(ETH_P_EDSA), | |
397 | + .tag_protocol = cpu_to_be16(ETH_P_EDSA), | |
398 | 398 | .priv_size = sizeof(struct mv88e6xxx_priv_state), |
399 | 399 | .probe = mv88e6123_61_65_probe, |
400 | 400 | .setup = mv88e6123_61_65_setup, |
net/dsa/mv88e6131.c
... | ... | @@ -353,7 +353,7 @@ |
353 | 353 | } |
354 | 354 | |
355 | 355 | static struct dsa_switch_driver mv88e6131_switch_driver = { |
356 | - .tag_protocol = __constant_htons(ETH_P_DSA), | |
356 | + .tag_protocol = cpu_to_be16(ETH_P_DSA), | |
357 | 357 | .priv_size = sizeof(struct mv88e6xxx_priv_state), |
358 | 358 | .probe = mv88e6131_probe, |
359 | 359 | .setup = mv88e6131_setup, |
net/dsa/tag_dsa.c
net/dsa/tag_edsa.c
net/dsa/tag_trailer.c
net/econet/af_econet.c
net/ipv4/af_inet.c
... | ... | @@ -1501,7 +1501,7 @@ |
1501 | 1501 | */ |
1502 | 1502 | |
1503 | 1503 | static struct packet_type ip_packet_type = { |
1504 | - .type = __constant_htons(ETH_P_IP), | |
1504 | + .type = cpu_to_be16(ETH_P_IP), | |
1505 | 1505 | .func = ip_rcv, |
1506 | 1506 | .gso_send_check = inet_gso_send_check, |
1507 | 1507 | .gso_segment = inet_gso_segment, |
net/ipv4/arp.c
net/ipv4/ipconfig.c
... | ... | @@ -100,8 +100,8 @@ |
100 | 100 | #define CONF_NAMESERVERS_MAX 3 /* Maximum number of nameservers |
101 | 101 | - '3' from resolv.h */ |
102 | 102 | |
103 | -#define NONE __constant_htonl(INADDR_NONE) | |
104 | -#define ANY __constant_htonl(INADDR_ANY) | |
103 | +#define NONE cpu_to_be32(INADDR_NONE) | |
104 | +#define ANY cpu_to_be32(INADDR_ANY) | |
105 | 105 | |
106 | 106 | /* |
107 | 107 | * Public IP configuration |
... | ... | @@ -406,7 +406,7 @@ |
406 | 406 | static int ic_rarp_recv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev); |
407 | 407 | |
408 | 408 | static struct packet_type rarp_packet_type __initdata = { |
409 | - .type = __constant_htons(ETH_P_RARP), | |
409 | + .type = cpu_to_be16(ETH_P_RARP), | |
410 | 410 | .func = ic_rarp_recv, |
411 | 411 | }; |
412 | 412 | |
... | ... | @@ -568,7 +568,7 @@ |
568 | 568 | static int ic_bootp_recv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev); |
569 | 569 | |
570 | 570 | static struct packet_type bootp_packet_type __initdata = { |
571 | - .type = __constant_htons(ETH_P_IP), | |
571 | + .type = cpu_to_be16(ETH_P_IP), | |
572 | 572 | .func = ic_bootp_recv, |
573 | 573 | }; |
574 | 574 |
net/ipv4/netfilter/nf_nat_snmp_basic.c
... | ... | @@ -1292,7 +1292,7 @@ |
1292 | 1292 | .expect_policy = &snmp_exp_policy, |
1293 | 1293 | .name = "snmp", |
1294 | 1294 | .tuple.src.l3num = AF_INET, |
1295 | - .tuple.src.u.udp.port = __constant_htons(SNMP_PORT), | |
1295 | + .tuple.src.u.udp.port = cpu_to_be16(SNMP_PORT), | |
1296 | 1296 | .tuple.dst.protonum = IPPROTO_UDP, |
1297 | 1297 | }; |
1298 | 1298 | |
... | ... | @@ -1302,7 +1302,7 @@ |
1302 | 1302 | .expect_policy = &snmp_exp_policy, |
1303 | 1303 | .name = "snmp_trap", |
1304 | 1304 | .tuple.src.l3num = AF_INET, |
1305 | - .tuple.src.u.udp.port = __constant_htons(SNMP_TRAP_PORT), | |
1305 | + .tuple.src.u.udp.port = cpu_to_be16(SNMP_TRAP_PORT), | |
1306 | 1306 | .tuple.dst.protonum = IPPROTO_UDP, |
1307 | 1307 | }; |
1308 | 1308 |
net/ipv4/route.c
... | ... | @@ -151,7 +151,7 @@ |
151 | 151 | |
152 | 152 | static struct dst_ops ipv4_dst_ops = { |
153 | 153 | .family = AF_INET, |
154 | - .protocol = __constant_htons(ETH_P_IP), | |
154 | + .protocol = cpu_to_be16(ETH_P_IP), | |
155 | 155 | .gc = rt_garbage_collect, |
156 | 156 | .check = ipv4_dst_check, |
157 | 157 | .destroy = ipv4_dst_destroy, |
... | ... | @@ -2696,7 +2696,7 @@ |
2696 | 2696 | |
2697 | 2697 | static struct dst_ops ipv4_dst_blackhole_ops = { |
2698 | 2698 | .family = AF_INET, |
2699 | - .protocol = __constant_htons(ETH_P_IP), | |
2699 | + .protocol = cpu_to_be16(ETH_P_IP), | |
2700 | 2700 | .destroy = ipv4_dst_destroy, |
2701 | 2701 | .check = ipv4_dst_check, |
2702 | 2702 | .update_pmtu = ipv4_rt_blackhole_update_pmtu, |
net/ipv4/xfrm4_policy.c
... | ... | @@ -241,7 +241,7 @@ |
241 | 241 | |
242 | 242 | static struct dst_ops xfrm4_dst_ops = { |
243 | 243 | .family = AF_INET, |
244 | - .protocol = __constant_htons(ETH_P_IP), | |
244 | + .protocol = cpu_to_be16(ETH_P_IP), | |
245 | 245 | .gc = xfrm4_garbage_collect, |
246 | 246 | .update_pmtu = xfrm4_update_pmtu, |
247 | 247 | .destroy = xfrm4_dst_destroy, |
net/ipv6/af_inet6.c
net/ipv6/route.c
... | ... | @@ -98,7 +98,7 @@ |
98 | 98 | |
99 | 99 | static struct dst_ops ip6_dst_ops_template = { |
100 | 100 | .family = AF_INET6, |
101 | - .protocol = __constant_htons(ETH_P_IPV6), | |
101 | + .protocol = cpu_to_be16(ETH_P_IPV6), | |
102 | 102 | .gc = ip6_dst_gc, |
103 | 103 | .gc_thresh = 1024, |
104 | 104 | .check = ip6_dst_check, |
... | ... | @@ -117,7 +117,7 @@ |
117 | 117 | |
118 | 118 | static struct dst_ops ip6_dst_blackhole_ops = { |
119 | 119 | .family = AF_INET6, |
120 | - .protocol = __constant_htons(ETH_P_IPV6), | |
120 | + .protocol = cpu_to_be16(ETH_P_IPV6), | |
121 | 121 | .destroy = ip6_dst_destroy, |
122 | 122 | .check = ip6_dst_check, |
123 | 123 | .update_pmtu = ip6_rt_blackhole_update_pmtu, |
net/ipv6/xfrm6_policy.c
... | ... | @@ -272,7 +272,7 @@ |
272 | 272 | |
273 | 273 | static struct dst_ops xfrm6_dst_ops = { |
274 | 274 | .family = AF_INET6, |
275 | - .protocol = __constant_htons(ETH_P_IPV6), | |
275 | + .protocol = cpu_to_be16(ETH_P_IPV6), | |
276 | 276 | .gc = xfrm6_garbage_collect, |
277 | 277 | .update_pmtu = xfrm6_update_pmtu, |
278 | 278 | .destroy = xfrm6_dst_destroy, |
net/ipx/af_ipx.c
... | ... | @@ -1959,12 +1959,12 @@ |
1959 | 1959 | SOCKOPS_WRAP(ipx_dgram, PF_IPX); |
1960 | 1960 | |
1961 | 1961 | static struct packet_type ipx_8023_packet_type = { |
1962 | - .type = __constant_htons(ETH_P_802_3), | |
1962 | + .type = cpu_to_be16(ETH_P_802_3), | |
1963 | 1963 | .func = ipx_rcv, |
1964 | 1964 | }; |
1965 | 1965 | |
1966 | 1966 | static struct packet_type ipx_dix_packet_type = { |
1967 | - .type = __constant_htons(ETH_P_IPX), | |
1967 | + .type = cpu_to_be16(ETH_P_IPX), | |
1968 | 1968 | .func = ipx_rcv, |
1969 | 1969 | }; |
1970 | 1970 |
net/irda/irmod.c
... | ... | @@ -56,7 +56,7 @@ |
56 | 56 | * Tell the kernel how IrDA packets should be handled. |
57 | 57 | */ |
58 | 58 | static struct packet_type irda_packet_type = { |
59 | - .type = __constant_htons(ETH_P_IRDA), | |
59 | + .type = cpu_to_be16(ETH_P_IRDA), | |
60 | 60 | .func = irlap_driver_rcv, /* Packet type handler irlap_frame.c */ |
61 | 61 | }; |
62 | 62 |
net/llc/llc_core.c
... | ... | @@ -148,12 +148,12 @@ |
148 | 148 | } |
149 | 149 | |
150 | 150 | static struct packet_type llc_packet_type = { |
151 | - .type = __constant_htons(ETH_P_802_2), | |
151 | + .type = cpu_to_be16(ETH_P_802_2), | |
152 | 152 | .func = llc_rcv, |
153 | 153 | }; |
154 | 154 | |
155 | 155 | static struct packet_type llc_tr_packet_type = { |
156 | - .type = __constant_htons(ETH_P_TR_802_2), | |
156 | + .type = cpu_to_be16(ETH_P_TR_802_2), | |
157 | 157 | .func = llc_rcv, |
158 | 158 | }; |
159 | 159 |
net/netfilter/ipvs/ip_vs_sync.c
... | ... | @@ -149,8 +149,8 @@ |
149 | 149 | /* multicast addr */ |
150 | 150 | static struct sockaddr_in mcast_addr = { |
151 | 151 | .sin_family = AF_INET, |
152 | - .sin_port = __constant_htons(IP_VS_SYNC_PORT), | |
153 | - .sin_addr.s_addr = __constant_htonl(IP_VS_SYNC_GROUP), | |
152 | + .sin_port = cpu_to_be16(IP_VS_SYNC_PORT), | |
153 | + .sin_addr.s_addr = cpu_to_be32(IP_VS_SYNC_GROUP), | |
154 | 154 | }; |
155 | 155 | |
156 | 156 |
net/netfilter/nf_conntrack_amanda.c
... | ... | @@ -177,7 +177,7 @@ |
177 | 177 | .me = THIS_MODULE, |
178 | 178 | .help = amanda_help, |
179 | 179 | .tuple.src.l3num = AF_INET, |
180 | - .tuple.src.u.udp.port = __constant_htons(10080), | |
180 | + .tuple.src.u.udp.port = cpu_to_be16(10080), | |
181 | 181 | .tuple.dst.protonum = IPPROTO_UDP, |
182 | 182 | .expect_policy = &amanda_exp_policy, |
183 | 183 | }, |
... | ... | @@ -186,7 +186,7 @@ |
186 | 186 | .me = THIS_MODULE, |
187 | 187 | .help = amanda_help, |
188 | 188 | .tuple.src.l3num = AF_INET6, |
189 | - .tuple.src.u.udp.port = __constant_htons(10080), | |
189 | + .tuple.src.u.udp.port = cpu_to_be16(10080), | |
190 | 190 | .tuple.dst.protonum = IPPROTO_UDP, |
191 | 191 | .expect_policy = &amanda_exp_policy, |
192 | 192 | }, |
net/netfilter/nf_conntrack_h323_main.c
... | ... | @@ -1167,7 +1167,7 @@ |
1167 | 1167 | .name = "Q.931", |
1168 | 1168 | .me = THIS_MODULE, |
1169 | 1169 | .tuple.src.l3num = AF_INET, |
1170 | - .tuple.src.u.tcp.port = __constant_htons(Q931_PORT), | |
1170 | + .tuple.src.u.tcp.port = cpu_to_be16(Q931_PORT), | |
1171 | 1171 | .tuple.dst.protonum = IPPROTO_TCP, |
1172 | 1172 | .help = q931_help, |
1173 | 1173 | .expect_policy = &q931_exp_policy, |
... | ... | @@ -1176,7 +1176,7 @@ |
1176 | 1176 | .name = "Q.931", |
1177 | 1177 | .me = THIS_MODULE, |
1178 | 1178 | .tuple.src.l3num = AF_INET6, |
1179 | - .tuple.src.u.tcp.port = __constant_htons(Q931_PORT), | |
1179 | + .tuple.src.u.tcp.port = cpu_to_be16(Q931_PORT), | |
1180 | 1180 | .tuple.dst.protonum = IPPROTO_TCP, |
1181 | 1181 | .help = q931_help, |
1182 | 1182 | .expect_policy = &q931_exp_policy, |
... | ... | @@ -1741,7 +1741,7 @@ |
1741 | 1741 | .name = "RAS", |
1742 | 1742 | .me = THIS_MODULE, |
1743 | 1743 | .tuple.src.l3num = AF_INET, |
1744 | - .tuple.src.u.udp.port = __constant_htons(RAS_PORT), | |
1744 | + .tuple.src.u.udp.port = cpu_to_be16(RAS_PORT), | |
1745 | 1745 | .tuple.dst.protonum = IPPROTO_UDP, |
1746 | 1746 | .help = ras_help, |
1747 | 1747 | .expect_policy = &ras_exp_policy, |
... | ... | @@ -1750,7 +1750,7 @@ |
1750 | 1750 | .name = "RAS", |
1751 | 1751 | .me = THIS_MODULE, |
1752 | 1752 | .tuple.src.l3num = AF_INET6, |
1753 | - .tuple.src.u.udp.port = __constant_htons(RAS_PORT), | |
1753 | + .tuple.src.u.udp.port = cpu_to_be16(RAS_PORT), | |
1754 | 1754 | .tuple.dst.protonum = IPPROTO_UDP, |
1755 | 1755 | .help = ras_help, |
1756 | 1756 | .expect_policy = &ras_exp_policy, |
net/netfilter/nf_conntrack_netbios_ns.c
... | ... | @@ -105,7 +105,7 @@ |
105 | 105 | static struct nf_conntrack_helper helper __read_mostly = { |
106 | 106 | .name = "netbios-ns", |
107 | 107 | .tuple.src.l3num = AF_INET, |
108 | - .tuple.src.u.udp.port = __constant_htons(NMBD_PORT), | |
108 | + .tuple.src.u.udp.port = cpu_to_be16(NMBD_PORT), | |
109 | 109 | .tuple.dst.protonum = IPPROTO_UDP, |
110 | 110 | .me = THIS_MODULE, |
111 | 111 | .help = help, |
net/netfilter/nf_conntrack_pptp.c
... | ... | @@ -591,7 +591,7 @@ |
591 | 591 | .name = "pptp", |
592 | 592 | .me = THIS_MODULE, |
593 | 593 | .tuple.src.l3num = AF_INET, |
594 | - .tuple.src.u.tcp.port = __constant_htons(PPTP_CONTROL_PORT), | |
594 | + .tuple.src.u.tcp.port = cpu_to_be16(PPTP_CONTROL_PORT), | |
595 | 595 | .tuple.dst.protonum = IPPROTO_TCP, |
596 | 596 | .help = conntrack_pptp_help, |
597 | 597 | .destroy = pptp_destroy_siblings, |
net/phonet/af_phonet.c
net/sctp/output.c
... | ... | @@ -367,7 +367,7 @@ |
367 | 367 | struct sctp_transport *tp = packet->transport; |
368 | 368 | struct sctp_association *asoc = tp->asoc; |
369 | 369 | struct sctphdr *sh; |
370 | - __be32 crc32 = __constant_cpu_to_be32(0); | |
370 | + __be32 crc32 = cpu_to_be32(0); | |
371 | 371 | struct sk_buff *nskb; |
372 | 372 | struct sctp_chunk *chunk, *tmp; |
373 | 373 | struct sock *sk; |
net/sctp/sm_make_chunk.c
... | ... | @@ -100,11 +100,11 @@ |
100 | 100 | */ |
101 | 101 | static const struct sctp_paramhdr ecap_param = { |
102 | 102 | SCTP_PARAM_ECN_CAPABLE, |
103 | - __constant_htons(sizeof(struct sctp_paramhdr)), | |
103 | + cpu_to_be16(sizeof(struct sctp_paramhdr)), | |
104 | 104 | }; |
105 | 105 | static const struct sctp_paramhdr prsctp_param = { |
106 | 106 | SCTP_PARAM_FWD_TSN_SUPPORT, |
107 | - __constant_htons(sizeof(struct sctp_paramhdr)), | |
107 | + cpu_to_be16(sizeof(struct sctp_paramhdr)), | |
108 | 108 | }; |
109 | 109 | |
110 | 110 | /* A helper to initialize to initialize an op error inside a |
net/x25/af_x25.c