]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
net: replace uses of __constant_{endian}
authorHarvey Harrison <harvey.harrison@gmail.com>
Sun, 1 Feb 2009 08:45:17 +0000 (00:45 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 1 Feb 2009 08:45:17 +0000 (00:45 -0800)
Base versions handle constant folding now.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
61 files changed:
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

index da017cbb5f641c0d8bf3c35fe346df660cdb7554..646dfc5f50c9827014f343ba3c62bc7960b85f4e 100644 (file)
@@ -122,7 +122,7 @@ static void rx(struct net_device *dev, int bufnum,
 
        BUGLVL(D_SKB) arcnet_dump_skb(dev, skb, "rx");
 
-       skb->protocol = __constant_htons(ETH_P_ARCNET);
+       skb->protocol = cpu_to_be16(ETH_P_ARCNET);
 ;
        netif_rx(skb);
 }
index 1613929ff30182cacd766e1464fdc4d84b3fc7e1..083e21094b20d69ae6fba917bef34485a5cd5766 100644 (file)
@@ -148,7 +148,7 @@ static void rx(struct net_device *dev, int bufnum,
 
        BUGLVL(D_SKB) arcnet_dump_skb(dev, skb, "rx");
 
-       skb->protocol = __constant_htons(ETH_P_ARCNET);
+       skb->protocol = cpu_to_be16(ETH_P_ARCNET);
 ;
        netif_rx(skb);
 }
@@ -282,7 +282,7 @@ static int ack_tx(struct net_device *dev, int acked)
   BUGMSG(D_PROTO, "Ackknowledge for cap packet %x.\n",
         *((int*)&ackpkt->soft.cap.cookie[0]));
 
-  ackskb->protocol = __constant_htons(ETH_P_ARCNET);
+  ackskb->protocol = cpu_to_be16(ETH_P_ARCNET);
 
   BUGLVL(D_SKB) arcnet_dump_skb(dev, ackskb, "ack_tx_recv");
   netif_rx(ackskb);
index 8a83eb283c21c8abecb64047be80a72faaa611b5..a306230381c8f69c0ba83523430a16cfb1bef8a3 100644 (file)
@@ -29,7 +29,7 @@
 
 // General definitions
 #define BOND_ETH_P_LACPDU       0x8809
-#define PKT_TYPE_LACPDU         __constant_htons(BOND_ETH_P_LACPDU)
+#define PKT_TYPE_LACPDU         cpu_to_be16(BOND_ETH_P_LACPDU)
 #define AD_TIMER_INTERVAL       100 /*msec*/
 
 #define MULTICAST_LACPDU_ADDR    {0x01, 0x80, 0xC2, 0x00, 0x00, 0x02}
index 27fb7f5c21cf57029b62d830ada44b6f26904dac..409b140742754cb61e0d60f649d6355a254979d5 100644 (file)
@@ -822,7 +822,7 @@ static int rlb_initialize(struct bonding *bond)
        _unlock_rx_hashtbl(bond);
 
        /*initialize packet type*/
-       pk_type->type = __constant_htons(ETH_P_ARP);
+       pk_type->type = cpu_to_be16(ETH_P_ARP);
        pk_type->dev = NULL;
        pk_type->func = rlb_arp_recv;
 
@@ -892,7 +892,7 @@ static void alb_send_learning_packets(struct slave *slave, u8 mac_addr[])
        memset(&pkt, 0, size);
        memcpy(pkt.mac_dst, mac_addr, ETH_ALEN);
        memcpy(pkt.mac_src, mac_addr, ETH_ALEN);
-       pkt.type = __constant_htons(ETH_P_LOOP);
+       pkt.type = cpu_to_be16(ETH_P_LOOP);
 
        for (i = 0; i < MAX_LP_BURST; i++) {
                struct sk_buff *skb;
index c4a303023b315555ec51f06d87224d40360e7bb9..40db34deebde84eee111e11fd89ded37dec76de0 100644 (file)
@@ -2860,11 +2860,11 @@ static bool e1000_tx_csum(struct e1000_adapter *adapter,
                return false;
 
        switch (skb->protocol) {
-       case __constant_htons(ETH_P_IP):
+       case cpu_to_be16(ETH_P_IP):
                if (ip_hdr(skb)->protocol == IPPROTO_TCP)
                        cmd_len |= E1000_TXD_CMD_TCP;
                break;
-       case __constant_htons(ETH_P_IPV6):
+       case cpu_to_be16(ETH_P_IPV6):
                /* XXX not handling all IPV6 headers */
                if (ipv6_hdr(skb)->nexthdr == IPPROTO_TCP)
                        cmd_len |= E1000_TXD_CMD_TCP;
index e04b392c9a594cbf7678ca7eb16802b6f9320e37..c425b19e33629d84c992c0b1bfb0dcb1ac67dedf 100644 (file)
@@ -3770,11 +3770,11 @@ static bool e1000_tx_csum(struct e1000_adapter *adapter, struct sk_buff *skb)
                return 0;
 
        switch (skb->protocol) {
-       case __constant_htons(ETH_P_IP):
+       case cpu_to_be16(ETH_P_IP):
                if (ip_hdr(skb)->protocol == IPPROTO_TCP)
                        cmd_len |= E1000_TXD_CMD_TCP;
                break;
-       case __constant_htons(ETH_P_IPV6):
+       case cpu_to_be16(ETH_P_IPV6):
                /* XXX not handling all IPV6 headers */
                if (ipv6_hdr(skb)->nexthdr == IPPROTO_TCP)
                        cmd_len |= E1000_TXD_CMD_TCP;
index 4617956821cd724c050bf819bb4610ce7464df17..5dd11563553eefea854faceec0eda746811d6ab7 100644 (file)
@@ -570,11 +570,11 @@ static inline void enic_queue_wq_skb_tso(struct enic *enic,
         * to each TCP segment resulting from the TSO.
         */
 
-       if (skb->protocol == __constant_htons(ETH_P_IP)) {
+       if (skb->protocol == cpu_to_be16(ETH_P_IP)) {
                ip_hdr(skb)->check = 0;
                tcp_hdr(skb)->check = ~csum_tcpudp_magic(ip_hdr(skb)->saddr,
                        ip_hdr(skb)->daddr, 0, IPPROTO_TCP, 0);
-       } else if (skb->protocol == __constant_htons(ETH_P_IPV6)) {
+       } else if (skb->protocol == cpu_to_be16(ETH_P_IPV6)) {
                tcp_hdr(skb)->check = ~csum_ipv6_magic(&ipv6_hdr(skb)->saddr,
                        &ipv6_hdr(skb)->daddr, 0, IPPROTO_TCP, 0);
        }
index 7e8b3c59a7d6ca1f2613e2d3028b3f3b18f7d952..455641f8677e6be6e523b2f7b2230b34662d6d59 100644 (file)
@@ -1244,7 +1244,7 @@ do { \
     csum_add(sum, (ih)->saddr & 0xffff); \
     csum_add(sum, (ih)->daddr >> 16); \
     csum_add(sum, (ih)->daddr & 0xffff); \
-    csum_add(sum, __constant_htons(IPPROTO_UDP)); \
+    csum_add(sum, cpu_to_be16(IPPROTO_UDP)); \
     csum_add(sum, (uh)->len); \
 } while (0)
 
@@ -1255,7 +1255,7 @@ do { \
     csum_add(sum, (ih)->saddr & 0xffff); \
     csum_add(sum, (ih)->daddr >> 16); \
     csum_add(sum, (ih)->daddr & 0xffff); \
-    csum_add(sum, __constant_htons(IPPROTO_TCP)); \
+    csum_add(sum, cpu_to_be16(IPPROTO_TCP)); \
     csum_add(sum, htons(len)); \
 } while (0)
 #endif
@@ -1296,7 +1296,7 @@ static int hamachi_start_xmit(struct sk_buff *skb, struct net_device *dev)
            /* tack on checksum tag */
            u32 tagval = 0;
            struct ethhdr *eh = (struct ethhdr *)skb->data;
-           if (eh->h_proto == __constant_htons(ETH_P_IP)) {
+           if (eh->h_proto == cpu_to_be16(ETH_P_IP)) {
                struct iphdr *ih = (struct iphdr *)((char *)eh + ETH_HLEN);
                if (ih->protocol == IPPROTO_UDP) {
                    struct udphdr *uh
@@ -1605,7 +1605,7 @@ static int hamachi_rx(struct net_device *dev)
                                 */
                                if (ntohs(ih->tot_len) >= 46){
                                        /* don't worry about frags */
-                                       if (!(ih->frag_off & __constant_htons(IP_MF|IP_OFFSET))) {
+                                       if (!(ih->frag_off & cpu_to_be16(IP_MF|IP_OFFSET))) {
                                                u32 inv = *(u32 *) &buf_addr[data_size - 16];
                                                u32 *p = (u32 *) &buf_addr[data_size - 20];
                                                register u32 crc, p_r, p_r1;
index 1f65d1edf132931096d4bd64070d206880f0e73c..2c619bc99ae79fc9ea58ff565a7751fccd5032c0 100644 (file)
@@ -97,7 +97,7 @@ static int bpq_rcv(struct sk_buff *, struct net_device *, struct packet_type *,
 static int bpq_device_event(struct notifier_block *, unsigned long, void *);
 
 static struct packet_type bpq_packet_type = {
-       .type   = __constant_htons(ETH_P_BPQ),
+       .type   = cpu_to_be16(ETH_P_BPQ),
        .func   = bpq_rcv,
 };
 
index bd166803671d366133fc775067fc08d1402ed7f8..cd794bac8b8086e595581c794e31add0ee57739c 100644 (file)
@@ -2749,12 +2749,12 @@ static inline bool igb_tx_csum_adv(struct igb_adapter *adapter,
 
                if (skb->ip_summed == CHECKSUM_PARTIAL) {
                        switch (skb->protocol) {
-                       case __constant_htons(ETH_P_IP):
+                       case cpu_to_be16(ETH_P_IP):
                                tu_cmd |= E1000_ADVTXD_TUCMD_IPV4;
                                if (ip_hdr(skb)->protocol == IPPROTO_TCP)
                                        tu_cmd |= E1000_ADVTXD_TUCMD_L4T_TCP;
                                break;
-                       case __constant_htons(ETH_P_IPV6):
+                       case cpu_to_be16(ETH_P_IPV6):
                                /* XXX what about other V6 headers?? */
                                if (ipv6_hdr(skb)->nexthdr == IPPROTO_TCP)
                                        tu_cmd |= E1000_ADVTXD_TUCMD_L4T_TCP;
index fe4a4d17c4bc8aa425f625233480a8f8ff8f406c..88615f69976e2fd931944412c7bc1f4e0119ad26 100644 (file)
@@ -3567,13 +3567,13 @@ static bool ixgbe_tx_csum(struct ixgbe_adapter *adapter,
 
                if (skb->ip_summed == CHECKSUM_PARTIAL) {
                        switch (skb->protocol) {
-                       case __constant_htons(ETH_P_IP):
+                       case cpu_to_be16(ETH_P_IP):
                                type_tucmd_mlhl |= IXGBE_ADVTXD_TUCMD_IPV4;
                                if (ip_hdr(skb)->protocol == IPPROTO_TCP)
                                        type_tucmd_mlhl |=
                                                IXGBE_ADVTXD_TUCMD_L4T_TCP;
                                break;
-                       case __constant_htons(ETH_P_IPV6):
+                       case cpu_to_be16(ETH_P_IPV6):
                                /* XXX what about other V6 headers?? */
                                if (ipv6_hdr(skb)->nexthdr == IPPROTO_TCP)
                                        type_tucmd_mlhl |=
index 899ed065a1478dc7ef4303b445285954776eb282..88b52883acea0705804aa6b7ee04da7c2e963ddf 100644 (file)
@@ -748,7 +748,7 @@ static int myri_rebuild_header(struct sk_buff *skb)
        switch (eth->h_proto)
        {
 #ifdef CONFIG_INET
-       case __constant_htons(ETH_P_IP):
+       case cpu_to_be16(ETH_P_IP):
                return arp_find(eth->h_dest, skb);
 #endif
 
index cc06cc5429feada9746c88de1c214431eee630db..ada462e94c96eadc6b85001fdf5dcaedcdf3e6c2 100644 (file)
@@ -1170,7 +1170,7 @@ static bool netxen_tso_check(struct net_device *netdev,
        __be16 protocol = skb->protocol;
        u16 flags = 0;
 
-       if (protocol == __constant_htons(ETH_P_8021Q)) {
+       if (protocol == cpu_to_be16(ETH_P_8021Q)) {
                struct vlan_ethhdr *vh = (struct vlan_ethhdr *)skb->data;
                protocol = vh->h_vlan_encapsulated_proto;
                flags = FLAGS_VLAN_TAGGED;
@@ -1183,21 +1183,21 @@ static bool netxen_tso_check(struct net_device *netdev,
                desc->total_hdr_length =
                        skb_transport_offset(skb) + tcp_hdrlen(skb);
 
-               opcode = (protocol == __constant_htons(ETH_P_IPV6)) ?
+               opcode = (protocol == cpu_to_be16(ETH_P_IPV6)) ?
                                TX_TCP_LSO6 : TX_TCP_LSO;
                tso = true;
 
        } else if (skb->ip_summed == CHECKSUM_PARTIAL) {
                u8 l4proto;
 
-               if (protocol == __constant_htons(ETH_P_IP)) {
+               if (protocol == cpu_to_be16(ETH_P_IP)) {
                        l4proto = ip_hdr(skb)->protocol;
 
                        if (l4proto == IPPROTO_TCP)
                                opcode = TX_TCP_PKT;
                        else if(l4proto == IPPROTO_UDP)
                                opcode = TX_UDP_PKT;
-               } else if (protocol == __constant_htons(ETH_P_IPV6)) {
+               } else if (protocol == cpu_to_be16(ETH_P_IPV6)) {
                        l4proto = ipv6_hdr(skb)->nexthdr;
 
                        if (l4proto == IPPROTO_TCP)
index 2346ca6bf5baa8a748b24e987f521e395cb76ab4..c26325ded20e35d821547e9aa3261b6ec96102e3 100644 (file)
@@ -6447,11 +6447,11 @@ static u64 niu_compute_tx_flags(struct sk_buff *skb, struct ethhdr *ehdr,
 
        ipv6 = ihl = 0;
        switch (skb->protocol) {
-       case __constant_htons(ETH_P_IP):
+       case cpu_to_be16(ETH_P_IP):
                ip_proto = ip_hdr(skb)->protocol;
                ihl = ip_hdr(skb)->ihl;
                break;
-       case __constant_htons(ETH_P_IPV6):
+       case cpu_to_be16(ETH_P_IPV6):
                ip_proto = ipv6_hdr(skb)->nexthdr;
                ihl = (40 >> 2);
                ipv6 = 1;
index 074803a78fc65060f7fc7dc1adad9c13274f00b1..1011fd64108b1718500bfc3121545feb8bef59d7 100644 (file)
@@ -514,12 +514,12 @@ out:
 }
 
 static struct packet_type pppoes_ptype = {
-       .type   = __constant_htons(ETH_P_PPP_SES),
+       .type   = cpu_to_be16(ETH_P_PPP_SES),
        .func   = pppoe_rcv,
 };
 
 static struct packet_type pppoed_ptype = {
-       .type   = __constant_htons(ETH_P_PPP_DISC),
+       .type   = cpu_to_be16(ETH_P_PPP_DISC),
        .func   = pppoe_disc_rcv,
 };
 
@@ -877,7 +877,7 @@ static int pppoe_sendmsg(struct kiocb *iocb, struct socket *sock,
        skb->dev = dev;
 
        skb->priority = sk->sk_priority;
-       skb->protocol = __constant_htons(ETH_P_PPP_SES);
+       skb->protocol = cpu_to_be16(ETH_P_PPP_SES);
 
        ph = (struct pppoe_hdr *)skb_put(skb, total_len + sizeof(struct pppoe_hdr));
        start = (char *)&ph->tag[0];
@@ -937,7 +937,7 @@ static int __pppoe_xmit(struct sock *sk, struct sk_buff *skb)
        ph->sid = po->num;
        ph->length = htons(data_len);
 
-       skb->protocol = __constant_htons(ETH_P_PPP_SES);
+       skb->protocol = cpu_to_be16(ETH_P_PPP_SES);
        skb->dev = dev;
 
        dev_hard_header(skb, dev, ETH_P_PPP_SES,
index 06649d0c20988e2d464c0629e4812a92a6bd2c2e..30900b30d532e9dedf2b040a672d47d0921e6203 100644 (file)
@@ -745,7 +745,7 @@ static inline struct sk_buff *gelic_put_vlan_tag(struct sk_buff *skb,
        /* Move the mac addresses to the top of buffer */
        memmove(skb->data, skb->data + VLAN_HLEN, 2 * ETH_ALEN);
 
-       veth->h_vlan_proto = __constant_htons(ETH_P_8021Q);
+       veth->h_vlan_proto = cpu_to_be16(ETH_P_8021Q);
        veth->h_vlan_TCI = htons(tag);
 
        return skb;
index d95c218280142108d8c490dea894ea6eb817b5f5..d54d84c267b906a4331f847008302b95566d2a33 100644 (file)
@@ -543,7 +543,7 @@ typedef union efx_oword {
 
 /* Static initialiser */
 #define EFX_OWORD32(a, b, c, d)                                                \
-       { .u32 = { __constant_cpu_to_le32(a), __constant_cpu_to_le32(b), \
-                  __constant_cpu_to_le32(c), __constant_cpu_to_le32(d) } }
+       { .u32 = { cpu_to_le32(a), cpu_to_le32(b), \
+                  cpu_to_le32(c), cpu_to_le32(d) } }
 
 #endif /* EFX_BITFIELD_H */
index e9bcbdfe015a6a593ea275f303c31fa0adea5417..457f2d7430cf13684f6ac4c5c971530d029d8b46 100644 (file)
@@ -543,7 +543,7 @@ static struct sk_buff *tun_alloc_skb(size_t prepad, size_t len, size_t linear,
 /* Get packet from user space buffer */
 static __inline__ ssize_t tun_get_user(struct tun_struct *tun, struct iovec *iv, size_t count)
 {
-       struct tun_pi pi = { 0, __constant_htons(ETH_P_IP) };
+       struct tun_pi pi = { 0, cpu_to_be16(ETH_P_IP) };
        struct sk_buff *skb;
        size_t len = count, align = 0;
        struct virtio_net_hdr gso = { 0 };
index 0d0fa91c025130fa96637d70a89b2cc101b89233..806cc5da56ce1d164facd0421d2c298a57d77612 100644 (file)
@@ -934,8 +934,7 @@ static void packetizeRx(struct hso_net *odev, unsigned char *ip_pkt,
                        if (!odev->rx_buf_missing) {
                                /* Packet is complete. Inject into stack. */
                                /* We have IP packet here */
-                               odev->skb_rx_buf->protocol =
-                                               __constant_htons(ETH_P_IP);
+                               odev->skb_rx_buf->protocol = cpu_to_be16(ETH_P_IP);
                                /* don't check it */
                                odev->skb_rx_buf->ip_summed =
                                        CHECKSUM_UNNECESSARY;
index 29a33090d3d4d7775c44eea63f13d5bbe1881c1a..ea43e1832afba07d389861b05ef3b2f6102f4595 100644 (file)
@@ -183,7 +183,7 @@ struct rdesc1 {
 };
 
 enum {
-       RX_INTEN = __constant_cpu_to_le16(0x8000)
+       RX_INTEN = cpu_to_le16(0x8000)
 };
 
 struct rx_desc {
@@ -210,7 +210,7 @@ struct tdesc1 {
 } __attribute__ ((__packed__));
 
 enum {
-       TD_QUEUE = __constant_cpu_to_le16(0x8000)
+       TD_QUEUE = cpu_to_le16(0x8000)
 };
 
 struct td_buf {
@@ -242,7 +242,7 @@ struct velocity_td_info {
 
 enum  velocity_owner {
        OWNED_BY_HOST = 0,
-       OWNED_BY_NIC = __constant_cpu_to_le16(0x8000)
+       OWNED_BY_NIC = cpu_to_le16(0x8000)
 };
 
 
index 43da8bd7297326aaf01af73b7cca9ebb8fa8ee1c..5ce4372055582bcb652a3aaa14562470bbf2c6c1 100644 (file)
@@ -349,7 +349,7 @@ EXPORT_SYMBOL(attach_hdlc_protocol);
 EXPORT_SYMBOL(detach_hdlc_protocol);
 
 static struct packet_type hdlc_packet_type = {
-       .type = __constant_htons(ETH_P_HDLC),
+       .type = cpu_to_be16(ETH_P_HDLC),
        .func = hdlc_rcv,
 };
 
index af3fd4fead8a680c297f24986cfc3015e879f55d..cf5fd17ad7075b7f1753ff1c4d84f028ea03338b 100644 (file)
@@ -117,7 +117,7 @@ static void cisco_keepalive_send(struct net_device *dev, u32 type,
        data->type = htonl(type);
        data->par1 = par1;
        data->par2 = par2;
-       data->rel = __constant_htons(0xFFFF);
+       data->rel = cpu_to_be16(0xFFFF);
        /* we will need do_div here if 1000 % HZ != 0 */
        data->time = htonl((jiffies - INITIAL_JIFFIES) * (1000 / HZ));
 
@@ -136,20 +136,20 @@ static __be16 cisco_type_trans(struct sk_buff *skb, struct net_device *dev)
        struct hdlc_header *data = (struct hdlc_header*)skb->data;
 
        if (skb->len < sizeof(struct hdlc_header))
-               return __constant_htons(ETH_P_HDLC);
+               return cpu_to_be16(ETH_P_HDLC);
 
        if (data->address != CISCO_MULTICAST &&
            data->address != CISCO_UNICAST)
-               return __constant_htons(ETH_P_HDLC);
+               return cpu_to_be16(ETH_P_HDLC);
 
        switch(data->protocol) {
-       case __constant_htons(ETH_P_IP):
-       case __constant_htons(ETH_P_IPX):
-       case __constant_htons(ETH_P_IPV6):
+       case cpu_to_be16(ETH_P_IP):
+       case cpu_to_be16(ETH_P_IPX):
+       case cpu_to_be16(ETH_P_IPV6):
                skb_pull(skb, sizeof(struct hdlc_header));
                return data->protocol;
        default:
-               return __constant_htons(ETH_P_HDLC);
+               return cpu_to_be16(ETH_P_HDLC);
        }
 }
 
@@ -194,7 +194,7 @@ static int cisco_rx(struct sk_buff *skb)
                case CISCO_ADDR_REQ: /* Stolen from syncppp.c :-) */
                        in_dev = dev->ip_ptr;
                        addr = 0;
-                       mask = __constant_htonl(~0); /* is the mask correct? */
+                       mask = ~cpu_to_be32(0); /* is the mask correct? */
 
                        if (in_dev != NULL) {
                                struct in_ifaddr **ifap = &in_dev->ifa_list;
index 70e57cebc9556f9ea397df91002f3be414153d2e..800530101093a10901ee16956bf75040a6ec971a 100644 (file)
@@ -278,31 +278,31 @@ static int fr_hard_header(struct sk_buff **skb_p, u16 dlci)
        struct sk_buff *skb = *skb_p;
 
        switch (skb->protocol) {
-       case __constant_htons(NLPID_CCITT_ANSI_LMI):
+       case cpu_to_be16(NLPID_CCITT_ANSI_LMI):
                head_len = 4;
                skb_push(skb, head_len);
                skb->data[3] = NLPID_CCITT_ANSI_LMI;
                break;
 
-       case __constant_htons(NLPID_CISCO_LMI):
+       case cpu_to_be16(NLPID_CISCO_LMI):
                head_len = 4;
                skb_push(skb, head_len);
                skb->data[3] = NLPID_CISCO_LMI;
                break;
 
-       case __constant_htons(ETH_P_IP):
+       case cpu_to_be16(ETH_P_IP):
                head_len = 4;
                skb_push(skb, head_len);
                skb->data[3] = NLPID_IP;
                break;
 
-       case __constant_htons(ETH_P_IPV6):
+       case cpu_to_be16(ETH_P_IPV6):
                head_len = 4;
                skb_push(skb, head_len);
                skb->data[3] = NLPID_IPV6;
                break;
 
-       case __constant_htons(ETH_P_802_3):
+       case cpu_to_be16(ETH_P_802_3):
                head_len = 10;
                if (skb_headroom(skb) < head_len) {
                        struct sk_buff *skb2 = skb_realloc_headroom(skb,
@@ -426,7 +426,7 @@ static int pvc_xmit(struct sk_buff *skb, struct net_device *dev)
                                skb_put(skb, pad);
                                memset(skb->data + len, 0, pad);
                        }
-                       skb->protocol = __constant_htons(ETH_P_802_3);
+                       skb->protocol = cpu_to_be16(ETH_P_802_3);
                }
                if (!fr_hard_header(&skb, pvc->dlci)) {
                        dev->stats.tx_bytes += skb->len;
@@ -496,10 +496,10 @@ static void fr_lmi_send(struct net_device *dev, int fullrep)
        memset(skb->data, 0, len);
        skb_reserve(skb, 4);
        if (lmi == LMI_CISCO) {
-               skb->protocol = __constant_htons(NLPID_CISCO_LMI);
+               skb->protocol = cpu_to_be16(NLPID_CISCO_LMI);
                fr_hard_header(&skb, LMI_CISCO_DLCI);
        } else {
-               skb->protocol = __constant_htons(NLPID_CCITT_ANSI_LMI);
+               skb->protocol = cpu_to_be16(NLPID_CCITT_ANSI_LMI);
                fr_hard_header(&skb, LMI_CCITT_ANSI_DLCI);
        }
        data = skb_tail_pointer(skb);
index 7b8a5eae201d2dcc26d1b0598cb0cbf65472cf9b..72a7cdab424531850f51462d6b16bf40c3faea50 100644 (file)
@@ -150,11 +150,11 @@ static __be16 ppp_type_trans(struct sk_buff *skb, struct net_device *dev)
                return htons(ETH_P_HDLC);
 
        switch (data->protocol) {
-       case __constant_htons(PID_IP):
+       case cpu_to_be16(PID_IP):
                skb_pull(skb, sizeof(struct hdlc_header));
                return htons(ETH_P_IP);
 
-       case __constant_htons(PID_IPV6):
+       case cpu_to_be16(PID_IPV6):
                skb_pull(skb, sizeof(struct hdlc_header));
                return htons(ETH_P_IPV6);
 
index 6e92c64ebd0f64f3c513541be1741a5d8ba84032..19f51fdd55227debdbcae8b10ab100feb93ee3d6 100644 (file)
@@ -27,7 +27,7 @@ static int raw_ioctl(struct net_device *dev, struct ifreq *ifr);
 
 static __be16 raw_type_trans(struct sk_buff *skb, struct net_device *dev)
 {
-       return __constant_htons(ETH_P_IP);
+       return cpu_to_be16(ETH_P_IP);
 }
 
 static struct hdlc_proto proto = {
index 5b61b3eef45f5b19da53e8e249b02895eaa6657a..da9dcf59de243d8bbfad5458e1f1d9ecb0491f6c 100644 (file)
@@ -422,7 +422,7 @@ static int lapbeth_device_event(struct notifier_block *this,
 /* ------------------------------------------------------------------------ */
 
 static struct packet_type lapbeth_packet_type = {
-       .type = __constant_htons(ETH_P_DEC),
+       .type = cpu_to_be16(ETH_P_DEC),
        .func = lapbeth_rcv,
 };
 
index 70980baeb68297bdc629b27f8ea63f68b0a9e04a..6ed711748f26a55d49e2073fb7f061c438e2ccd8 100644 (file)
@@ -51,7 +51,7 @@ static int snap_rcv(struct sk_buff *skb, struct net_device *dev,
        int rc = 1;
        struct datalink_proto *proto;
        static struct packet_type snap_packet_type = {
-               .type = __constant_htons(ETH_P_SNAP),
+               .type = cpu_to_be16(ETH_P_SNAP),
        };
 
        if (unlikely(!pskb_may_pull(skb, 5)))
index 41e8f65bd3f0f6ea0a121ad4bc48f68ffd569a61..4163ea65bf4152c40d29f978f4e75f7fbe6e10dc 100644 (file)
@@ -52,7 +52,7 @@ static const char vlan_copyright[] = "Ben Greear <greearb@candelatech.com>";
 static const char vlan_buggyright[] = "David S. Miller <davem@redhat.com>";
 
 static struct packet_type vlan_packet_type = {
-       .type = __constant_htons(ETH_P_8021Q),
+       .type = cpu_to_be16(ETH_P_8021Q),
        .func = vlan_skb_recv, /* VLAN receive method */
 };
 
index 5abce07fb50a195b1f280af8dbe588e2fefc2d6c..510a6782da8f83e70a324c21cb0d47b976e2f952 100644 (file)
@@ -1861,12 +1861,12 @@ static struct notifier_block ddp_notifier = {
 };
 
 static struct packet_type ltalk_packet_type = {
-       .type           = __constant_htons(ETH_P_LOCALTALK),
+       .type           = cpu_to_be16(ETH_P_LOCALTALK),
        .func           = ltalk_rcv,
 };
 
 static struct packet_type ppptalk_packet_type = {
-       .type           = __constant_htons(ETH_P_PPPTALK),
+       .type           = cpu_to_be16(ETH_P_PPPTALK),
        .func           = atalk_rcv,
 };
 
index 00d9e5e131582669cab51f01b91b43c204ea0da8..d127fd3ba5c6acd8a7c3ce0f6b4ea5ee8b25f47b 100644 (file)
@@ -1986,7 +1986,7 @@ static const struct proto_ops ax25_proto_ops = {
  *     Called by socket.c on kernel start up
  */
 static struct packet_type ax25_packet_type = {
-       .type   =       __constant_htons(ETH_P_AX25),
+       .type   =       cpu_to_be16(ETH_P_AX25),
        .dev    =       NULL,                           /* All devices */
        .func   =       ax25_kiss_rcv,
 };
index cf754ace0b75ba8c57e35e9420cfd97137ff88f9..3953ac4214c818e27a2a19d39c3e71bdd531f17a 100644 (file)
@@ -107,7 +107,7 @@ static void fake_update_pmtu(struct dst_entry *dst, u32 mtu)
 
 static struct dst_ops fake_dst_ops = {
        .family =               AF_INET,
-       .protocol =             __constant_htons(ETH_P_IP),
+       .protocol =             cpu_to_be16(ETH_P_IP),
        .update_pmtu =          fake_update_pmtu,
        .entries =              ATOMIC_INIT(0),
 };
index fa417ca6cbe6c88cf97c305ed399681125acdc03..d90e8dd975fcf05d842be52fd41ef8e1f369d411 100644 (file)
@@ -828,7 +828,7 @@ static int can_notifier(struct notifier_block *nb, unsigned long msg,
  */
 
 static struct packet_type can_packet __read_mostly = {
-       .type = __constant_htons(ETH_P_CAN),
+       .type = cpu_to_be16(ETH_P_CAN),
        .dev  = NULL,
        .func = can_rcv,
 };
index cf0e18499297080bac82f4b020409dd2dbb0f5fa..12bf7d4c16c641dd31a33904331b43d0069a666f 100644 (file)
@@ -2113,7 +2113,7 @@ static struct notifier_block dn_dev_notifier = {
 extern int dn_route_rcv(struct sk_buff *, struct net_device *, struct packet_type *, struct net_device *);
 
 static struct packet_type dn_dix_packet_type = {
-       .type =         __constant_htons(ETH_P_DNA_RT),
+       .type =         cpu_to_be16(ETH_P_DNA_RT),
        .dev =          NULL,           /* All devices */
        .func =         dn_route_rcv,
 };
index c754670b7fca4e98376fdb22657efb5e3e5613d6..5130dee0b384023911306aaf29da23aab1a1dc30 100644 (file)
@@ -124,7 +124,7 @@ int decnet_dst_gc_interval = 2;
 
 static struct dst_ops dn_dst_ops = {
        .family =               PF_DECnet,
-       .protocol =             __constant_htons(ETH_P_DNA_RT),
+       .protocol =             cpu_to_be16(ETH_P_DNA_RT),
        .gc_thresh =            128,
        .gc =                   dn_dst_gc,
        .check =                dn_dst_check,
index ec8c6a0482d3dde28385c498fbad59707da6ede3..1003187222146c2a7708258369c7a30d15243762 100644 (file)
@@ -394,7 +394,7 @@ static int mv88e6123_61_65_get_sset_count(struct dsa_switch *ds)
 }
 
 static struct dsa_switch_driver mv88e6123_61_65_switch_driver = {
-       .tag_protocol           = __constant_htons(ETH_P_EDSA),
+       .tag_protocol           = cpu_to_be16(ETH_P_EDSA),
        .priv_size              = sizeof(struct mv88e6xxx_priv_state),
        .probe                  = mv88e6123_61_65_probe,
        .setup                  = mv88e6123_61_65_setup,
index 374d46a01265a334901bc652c57b939a419ddfaf..70fae2444cb65e64828e07bcbd9aef5bf35f2b65 100644 (file)
@@ -353,7 +353,7 @@ static int mv88e6131_get_sset_count(struct dsa_switch *ds)
 }
 
 static struct dsa_switch_driver mv88e6131_switch_driver = {
-       .tag_protocol           = __constant_htons(ETH_P_DSA),
+       .tag_protocol           = cpu_to_be16(ETH_P_DSA),
        .priv_size              = sizeof(struct mv88e6xxx_priv_state),
        .probe                  = mv88e6131_probe,
        .setup                  = mv88e6131_setup,
index f99a019b939ed7e2b15e90bcfa5be1716accd1b9..63e532a69fdb1186077d0cc6dd658f276ec59565 100644 (file)
@@ -176,7 +176,7 @@ out:
 }
 
 static struct packet_type dsa_packet_type = {
-       .type   = __constant_htons(ETH_P_DSA),
+       .type   = cpu_to_be16(ETH_P_DSA),
        .func   = dsa_rcv,
 };
 
index 328ec957f7864a670ce7ad841ae43010fa2d2e35..6197f9a7ef421f7eec701f8a61defdbb11bcbbdb 100644 (file)
@@ -195,7 +195,7 @@ out:
 }
 
 static struct packet_type edsa_packet_type = {
-       .type   = __constant_htons(ETH_P_EDSA),
+       .type   = cpu_to_be16(ETH_P_EDSA),
        .func   = edsa_rcv,
 };
 
index b59132878ad1c45ce54271213d5b4909d5113809..d7e7f424ff0c4a09c6bccb8cdff5fbbe556e687e 100644 (file)
@@ -112,7 +112,7 @@ out:
 }
 
 static struct packet_type trailer_packet_type = {
-       .type   = __constant_htons(ETH_P_TRAILER),
+       .type   = cpu_to_be16(ETH_P_TRAILER),
        .func   = trailer_rcv,
 };
 
index 8789d2bb1b067fd59515a286610971a67dfebf37..7bf35582f65643f97e959b290a77bc66f2b88538 100644 (file)
@@ -1103,7 +1103,7 @@ drop:
 }
 
 static struct packet_type econet_packet_type = {
-       .type =         __constant_htons(ETH_P_ECONET),
+       .type =         cpu_to_be16(ETH_P_ECONET),
        .func =         econet_rcv,
 };
 
index d6770f295d5bc304820a8993c3127e8969ec33f3..957cd054732cd7b23a05c6fb22206bbaa5c4a0c3 100644 (file)
@@ -1501,7 +1501,7 @@ static int ipv4_proc_init(void);
  */
 
 static struct packet_type ip_packet_type = {
-       .type = __constant_htons(ETH_P_IP),
+       .type = cpu_to_be16(ETH_P_IP),
        .func = ip_rcv,
        .gso_send_check = inet_gso_send_check,
        .gso_segment = inet_gso_segment,
index 29a74c01d8de54857fa3ef4a82184dc8a03b91cd..3f6b7354699bb8fe8df7cb47a1ced87e9816cf06 100644 (file)
@@ -1226,7 +1226,7 @@ void arp_ifdown(struct net_device *dev)
  */
 
 static struct packet_type arp_packet_type = {
-       .type = __constant_htons(ETH_P_ARP),
+       .type = cpu_to_be16(ETH_P_ARP),
        .func = arp_rcv,
 };
 
index d722013c1cae2a620c70282e39a767662bf608c5..90d22ae0a419e95f4a34c26a40673b03ed1840b1 100644 (file)
 #define CONF_NAMESERVERS_MAX   3       /* Maximum number of nameservers
                                           - '3' from resolv.h */
 
-#define NONE __constant_htonl(INADDR_NONE)
-#define ANY __constant_htonl(INADDR_ANY)
+#define NONE cpu_to_be32(INADDR_NONE)
+#define ANY cpu_to_be32(INADDR_ANY)
 
 /*
  * Public IP configuration
@@ -406,7 +406,7 @@ static int __init ic_defaults(void)
 static int ic_rarp_recv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev);
 
 static struct packet_type rarp_packet_type __initdata = {
-       .type = __constant_htons(ETH_P_RARP),
+       .type = cpu_to_be16(ETH_P_RARP),
        .func = ic_rarp_recv,
 };
 
@@ -568,7 +568,7 @@ struct bootp_pkt {          /* BOOTP packet format */
 static int ic_bootp_recv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev);
 
 static struct packet_type bootp_packet_type __initdata = {
-       .type = __constant_htons(ETH_P_IP),
+       .type = cpu_to_be16(ETH_P_IP),
        .func = ic_bootp_recv,
 };
 
index 182f845de92f762e76a5bb5546aa417cf81330bf..d9521f6f9ed0f29a9eeabc27710636d7c6393ac9 100644 (file)
@@ -1292,7 +1292,7 @@ static struct nf_conntrack_helper snmp_helper __read_mostly = {
        .expect_policy          = &snmp_exp_policy,
        .name                   = "snmp",
        .tuple.src.l3num        = AF_INET,
-       .tuple.src.u.udp.port   = __constant_htons(SNMP_PORT),
+       .tuple.src.u.udp.port   = cpu_to_be16(SNMP_PORT),
        .tuple.dst.protonum     = IPPROTO_UDP,
 };
 
@@ -1302,7 +1302,7 @@ static struct nf_conntrack_helper snmp_trap_helper __read_mostly = {
        .expect_policy          = &snmp_exp_policy,
        .name                   = "snmp_trap",
        .tuple.src.l3num        = AF_INET,
-       .tuple.src.u.udp.port   = __constant_htons(SNMP_TRAP_PORT),
+       .tuple.src.u.udp.port   = cpu_to_be16(SNMP_TRAP_PORT),
        .tuple.dst.protonum     = IPPROTO_UDP,
 };
 
index 6a9e204c8024b04165ef9bca25962a486e8f5cef..5caee609be06bb9f3b205a7a1a8628f655212ec5 100644 (file)
@@ -151,7 +151,7 @@ static void rt_emergency_hash_rebuild(struct net *net);
 
 static struct dst_ops ipv4_dst_ops = {
        .family =               AF_INET,
-       .protocol =             __constant_htons(ETH_P_IP),
+       .protocol =             cpu_to_be16(ETH_P_IP),
        .gc =                   rt_garbage_collect,
        .check =                ipv4_dst_check,
        .destroy =              ipv4_dst_destroy,
@@ -2696,7 +2696,7 @@ static void ipv4_rt_blackhole_update_pmtu(struct dst_entry *dst, u32 mtu)
 
 static struct dst_ops ipv4_dst_blackhole_ops = {
        .family                 =       AF_INET,
-       .protocol               =       __constant_htons(ETH_P_IP),
+       .protocol               =       cpu_to_be16(ETH_P_IP),
        .destroy                =       ipv4_dst_destroy,
        .check                  =       ipv4_dst_check,
        .update_pmtu            =       ipv4_rt_blackhole_update_pmtu,
index 2ad24ba31f9de591df4305d7b3d406318ec18976..60d918c96a4fff19c0d4062558ea8c594fa9bef2 100644 (file)
@@ -241,7 +241,7 @@ static void xfrm4_dst_ifdown(struct dst_entry *dst, struct net_device *dev,
 
 static struct dst_ops xfrm4_dst_ops = {
        .family =               AF_INET,
-       .protocol =             __constant_htons(ETH_P_IP),
+       .protocol =             cpu_to_be16(ETH_P_IP),
        .gc =                   xfrm4_garbage_collect,
        .update_pmtu =          xfrm4_update_pmtu,
        .destroy =              xfrm4_dst_destroy,
index bd91eadcbe3fc8fb36295d9acda2871c2b35ce01..fa2ac7ee662fa3de8bc162ca2a2429b2dcebde28 100644 (file)
@@ -890,7 +890,7 @@ out_unlock:
 }
 
 static struct packet_type ipv6_packet_type = {
-       .type = __constant_htons(ETH_P_IPV6),
+       .type = cpu_to_be16(ETH_P_IPV6),
        .func = ipv6_rcv,
        .gso_send_check = ipv6_gso_send_check,
        .gso_segment = ipv6_gso_segment,
index 9c574235c9058bb137bcc0f6bc8e8188c7111f63..c3d486a3edad17f4a9125829462863850ced9a65 100644 (file)
@@ -98,7 +98,7 @@ static struct rt6_info *rt6_get_route_info(struct net *net,
 
 static struct dst_ops ip6_dst_ops_template = {
        .family                 =       AF_INET6,
-       .protocol               =       __constant_htons(ETH_P_IPV6),
+       .protocol               =       cpu_to_be16(ETH_P_IPV6),
        .gc                     =       ip6_dst_gc,
        .gc_thresh              =       1024,
        .check                  =       ip6_dst_check,
@@ -117,7 +117,7 @@ static void ip6_rt_blackhole_update_pmtu(struct dst_entry *dst, u32 mtu)
 
 static struct dst_ops ip6_dst_blackhole_ops = {
        .family                 =       AF_INET6,
-       .protocol               =       __constant_htons(ETH_P_IPV6),
+       .protocol               =       cpu_to_be16(ETH_P_IPV6),
        .destroy                =       ip6_dst_destroy,
        .check                  =       ip6_dst_check,
        .update_pmtu            =       ip6_rt_blackhole_update_pmtu,
index 97ab068e8ccc10be9d1ee27ec3b4a081322bb307..b4b16a43f2771bd62558a2cd8ca3af60b0d99808 100644 (file)
@@ -272,7 +272,7 @@ static void xfrm6_dst_ifdown(struct dst_entry *dst, struct net_device *dev,
 
 static struct dst_ops xfrm6_dst_ops = {
        .family =               AF_INET6,
-       .protocol =             __constant_htons(ETH_P_IPV6),
+       .protocol =             cpu_to_be16(ETH_P_IPV6),
        .gc =                   xfrm6_garbage_collect,
        .update_pmtu =          xfrm6_update_pmtu,
        .destroy =              xfrm6_dst_destroy,
index b6e70f92e7fb016140aa393fce90fa486cc12e95..43d0ffc6d5655ab2e5b18d77c249e21a2b33e28e 100644 (file)
@@ -1959,12 +1959,12 @@ static const struct proto_ops SOCKOPS_WRAPPED(ipx_dgram_ops) = {
 SOCKOPS_WRAP(ipx_dgram, PF_IPX);
 
 static struct packet_type ipx_8023_packet_type = {
-       .type           = __constant_htons(ETH_P_802_3),
+       .type           = cpu_to_be16(ETH_P_802_3),
        .func           = ipx_rcv,
 };
 
 static struct packet_type ipx_dix_packet_type = {
-       .type           = __constant_htons(ETH_P_IPX),
+       .type           = cpu_to_be16(ETH_P_IPX),
        .func           = ipx_rcv,
 };
 
index 4c487a883725e7f3ad4c98c567a248b16880688c..1bb607f2f5c7715222ed3f3f0108fca3391bff80 100644 (file)
@@ -56,7 +56,7 @@ EXPORT_SYMBOL(irda_debug);
  * Tell the kernel how IrDA packets should be handled.
  */
 static struct packet_type irda_packet_type = {
-       .type   = __constant_htons(ETH_P_IRDA),
+       .type   = cpu_to_be16(ETH_P_IRDA),
        .func   = irlap_driver_rcv,     /* Packet type handler irlap_frame.c */
 };
 
index 50d5b10e23a27e52898a9a65e4f75bc6edd78f18..a7fe1adc378d68834a70f44739c98f927659d927 100644 (file)
@@ -148,12 +148,12 @@ void llc_sap_close(struct llc_sap *sap)
 }
 
 static struct packet_type llc_packet_type = {
-       .type = __constant_htons(ETH_P_802_2),
+       .type = cpu_to_be16(ETH_P_802_2),
        .func = llc_rcv,
 };
 
 static struct packet_type llc_tr_packet_type = {
-       .type = __constant_htons(ETH_P_TR_802_2),
+       .type = cpu_to_be16(ETH_P_TR_802_2),
        .func = llc_rcv,
 };
 
index 6be5d4efa51ba58c9f13bb40b475bcb58c6795ca..5c48378a852fba2bf9f27156774daf02d67442e4 100644 (file)
@@ -149,8 +149,8 @@ static struct task_struct *sync_backup_thread;
 /* multicast addr */
 static struct sockaddr_in mcast_addr = {
        .sin_family             = AF_INET,
-       .sin_port               = __constant_htons(IP_VS_SYNC_PORT),
-       .sin_addr.s_addr        = __constant_htonl(IP_VS_SYNC_GROUP),
+       .sin_port               = cpu_to_be16(IP_VS_SYNC_PORT),
+       .sin_addr.s_addr        = cpu_to_be32(IP_VS_SYNC_GROUP),
 };
 
 
index 4f8fcf498545f302105535bfebaf34b9755908fe..07d9d8857e5db50b2d80bca709e137c4472b8724 100644 (file)
@@ -177,7 +177,7 @@ static struct nf_conntrack_helper amanda_helper[2] __read_mostly = {
                .me                     = THIS_MODULE,
                .help                   = amanda_help,
                .tuple.src.l3num        = AF_INET,
-               .tuple.src.u.udp.port   = __constant_htons(10080),
+               .tuple.src.u.udp.port   = cpu_to_be16(10080),
                .tuple.dst.protonum     = IPPROTO_UDP,
                .expect_policy          = &amanda_exp_policy,
        },
@@ -186,7 +186,7 @@ static struct nf_conntrack_helper amanda_helper[2] __read_mostly = {
                .me                     = THIS_MODULE,
                .help                   = amanda_help,
                .tuple.src.l3num        = AF_INET6,
-               .tuple.src.u.udp.port   = __constant_htons(10080),
+               .tuple.src.u.udp.port   = cpu_to_be16(10080),
                .tuple.dst.protonum     = IPPROTO_UDP,
                .expect_policy          = &amanda_exp_policy,
        },
index 687bd633c3d7020c277ba0f25b6e3033fd5053c7..66369490230e03eab8ac592365f296bc44704c7f 100644 (file)
@@ -1167,7 +1167,7 @@ static struct nf_conntrack_helper nf_conntrack_helper_q931[] __read_mostly = {
                .name                   = "Q.931",
                .me                     = THIS_MODULE,
                .tuple.src.l3num        = AF_INET,
-               .tuple.src.u.tcp.port   = __constant_htons(Q931_PORT),
+               .tuple.src.u.tcp.port   = cpu_to_be16(Q931_PORT),
                .tuple.dst.protonum     = IPPROTO_TCP,
                .help                   = q931_help,
                .expect_policy          = &q931_exp_policy,
@@ -1176,7 +1176,7 @@ static struct nf_conntrack_helper nf_conntrack_helper_q931[] __read_mostly = {
                .name                   = "Q.931",
                .me                     = THIS_MODULE,
                .tuple.src.l3num        = AF_INET6,
-               .tuple.src.u.tcp.port   = __constant_htons(Q931_PORT),
+               .tuple.src.u.tcp.port   = cpu_to_be16(Q931_PORT),
                .tuple.dst.protonum     = IPPROTO_TCP,
                .help                   = q931_help,
                .expect_policy          = &q931_exp_policy,
@@ -1741,7 +1741,7 @@ static struct nf_conntrack_helper nf_conntrack_helper_ras[] __read_mostly = {
                .name                   = "RAS",
                .me                     = THIS_MODULE,
                .tuple.src.l3num        = AF_INET,
-               .tuple.src.u.udp.port   = __constant_htons(RAS_PORT),
+               .tuple.src.u.udp.port   = cpu_to_be16(RAS_PORT),
                .tuple.dst.protonum     = IPPROTO_UDP,
                .help                   = ras_help,
                .expect_policy          = &ras_exp_policy,
@@ -1750,7 +1750,7 @@ static struct nf_conntrack_helper nf_conntrack_helper_ras[] __read_mostly = {
                .name                   = "RAS",
                .me                     = THIS_MODULE,
                .tuple.src.l3num        = AF_INET6,
-               .tuple.src.u.udp.port   = __constant_htons(RAS_PORT),
+               .tuple.src.u.udp.port   = cpu_to_be16(RAS_PORT),
                .tuple.dst.protonum     = IPPROTO_UDP,
                .help                   = ras_help,
                .expect_policy          = &ras_exp_policy,
index 5af4273b4668c3bf53b0ea1dc1937ed973831610..8a3875e36ec2d37ffbfa197fc4226e41a4a12fe4 100644 (file)
@@ -105,7 +105,7 @@ static struct nf_conntrack_expect_policy exp_policy = {
 static struct nf_conntrack_helper helper __read_mostly = {
        .name                   = "netbios-ns",
        .tuple.src.l3num        = AF_INET,
-       .tuple.src.u.udp.port   = __constant_htons(NMBD_PORT),
+       .tuple.src.u.udp.port   = cpu_to_be16(NMBD_PORT),
        .tuple.dst.protonum     = IPPROTO_UDP,
        .me                     = THIS_MODULE,
        .help                   = help,
index 9e169ef2e85443eaff5c8224ccbeaad1d0f4a202..72cca638a82d1008eddfcc7318a0f74f2c433cb2 100644 (file)
@@ -591,7 +591,7 @@ static struct nf_conntrack_helper pptp __read_mostly = {
        .name                   = "pptp",
        .me                     = THIS_MODULE,
        .tuple.src.l3num        = AF_INET,
-       .tuple.src.u.tcp.port   = __constant_htons(PPTP_CONTROL_PORT),
+       .tuple.src.u.tcp.port   = cpu_to_be16(PPTP_CONTROL_PORT),
        .tuple.dst.protonum     = IPPROTO_TCP,
        .help                   = conntrack_pptp_help,
        .destroy                = pptp_destroy_siblings,
index 95bc49ddb8bf3588ff4b301d52122cb4b274885a..81795ea87794af8b10540451313c5969e0beb4d7 100644 (file)
@@ -383,7 +383,7 @@ out:
 }
 
 static struct packet_type phonet_packet_type = {
-       .type = __constant_htons(ETH_P_PHONET),
+       .type = cpu_to_be16(ETH_P_PHONET),
        .dev = NULL,
        .func = phonet_rcv,
 };
index 73639355157e8bea9659b5539fb2d83f6c67a919..47bfba6c03ecf66996b94b229a5849a5e8e23220 100644 (file)
@@ -367,7 +367,7 @@ int sctp_packet_transmit(struct sctp_packet *packet)
        struct sctp_transport *tp = packet->transport;
        struct sctp_association *asoc = tp->asoc;
        struct sctphdr *sh;
-       __be32 crc32 = __constant_cpu_to_be32(0);
+       __be32 crc32 = cpu_to_be32(0);
        struct sk_buff *nskb;
        struct sctp_chunk *chunk, *tmp;
        struct sock *sk;
index fd8acb48c3f2827f069c36b8ef01e0fd34f14349..b40e95f9851b243870f2c1306c730ee7ff72e215 100644 (file)
@@ -100,11 +100,11 @@ int sctp_chunk_iif(const struct sctp_chunk *chunk)
  */
 static const struct sctp_paramhdr ecap_param = {
        SCTP_PARAM_ECN_CAPABLE,
-       __constant_htons(sizeof(struct sctp_paramhdr)),
+       cpu_to_be16(sizeof(struct sctp_paramhdr)),
 };
 static const struct sctp_paramhdr prsctp_param = {
        SCTP_PARAM_FWD_TSN_SUPPORT,
-       __constant_htons(sizeof(struct sctp_paramhdr)),
+       cpu_to_be16(sizeof(struct sctp_paramhdr)),
 };
 
 /* A helper to initialize to initialize an op error inside a
index 9fc5b023d1118a990944cbe32ff5ab2c81e07f5b..8f76f4009c24d3c2c1d596afea65f36317c7d335 100644 (file)
@@ -1609,7 +1609,7 @@ static const struct proto_ops SOCKOPS_WRAPPED(x25_proto_ops) = {
 SOCKOPS_WRAP(x25_proto, AF_X25);
 
 static struct packet_type x25_packet_type = {
-       .type = __constant_htons(ETH_P_X25),
+       .type = cpu_to_be16(ETH_P_X25),
        .func = x25_lapb_receive_frame,
 };