vmxnet: trivial annotation of protocol constant
authorHarvey Harrison <harvey.harrison@gmail.com>
Sat, 30 Oct 2010 23:19:45 +0000 (16:19 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 30 Oct 2010 23:19:45 +0000 (16:19 -0700)
Noticed by sparse:
drivers/net/vmxnet3/vmxnet3_drv.c:876:38: warning: cast from restricted __be16
drivers/net/vmxnet3/vmxnet3_drv.c:876:38: warning: cast from restricted __be16
drivers/net/vmxnet3/vmxnet3_drv.c:876:24: warning: restricted __be16 degrades to integer

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/vmxnet3/vmxnet3_drv.c

index e3658e10db390dd2ef74d62bd9c34004abe2d4dd..21314e06e6d7da4722bb9fc0d9306a916da7f551 100644 (file)
@@ -873,7 +873,7 @@ vmxnet3_tq_xmit(struct sk_buff *skb, struct vmxnet3_tx_queue *tq,
        count = VMXNET3_TXD_NEEDED(skb_headlen(skb)) +
                skb_shinfo(skb)->nr_frags + 1;
 
        count = VMXNET3_TXD_NEEDED(skb_headlen(skb)) +
                skb_shinfo(skb)->nr_frags + 1;
 
-       ctx.ipv4 = (skb->protocol == __constant_ntohs(ETH_P_IP));
+       ctx.ipv4 = (skb->protocol == cpu_to_be16(ETH_P_IP));
 
        ctx.mss = skb_shinfo(skb)->gso_size;
        if (ctx.mss) {
 
        ctx.mss = skb_shinfo(skb)->gso_size;
        if (ctx.mss) {