From 4562b2fe1ebc7c547746660f735ff9af964f28ad Mon Sep 17 00:00:00 2001 From: Harvey Harrison Date: Mon, 28 Mar 2011 17:08:59 +0000 Subject: via-rhine: trivial sparse annotation in vlan_tci helper Noticed by sparse: drivers/net/via-rhine.c:1706:16: warning: cast to restricted __be16 Signed-off-by: Harvey Harrison Signed-off-by: David S. Miller --- drivers/net/via-rhine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/net') diff --git a/drivers/net/via-rhine.c b/drivers/net/via-rhine.c index 5e7f069eab5..707f7f8beb6 100644 --- a/drivers/net/via-rhine.c +++ b/drivers/net/via-rhine.c @@ -1703,7 +1703,7 @@ static void rhine_tx(struct net_device *dev) static inline u16 rhine_get_vlan_tci(struct sk_buff *skb, int data_size) { u8 *trailer = (u8 *)skb->data + ((data_size + 3) & ~3) + 2; - return ntohs(*(u16 *)trailer); + return be16_to_cpup((__be16 *)trailer); } /* Process up to limit frames from receive ring */ -- cgit v1.2.3-18-g5258