via-rhine: trivial sparse annotation in vlan_tci helper
Subsystems (2)
PATCH 1/1 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 <[email protected]>
--- drivers/net/via-rhine.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/via-rhine.c +1 -1
@@ -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 */
Signature · 1 line
1.7.4
From: Harvey Harrison <[email protected]>
Date: Mon, 28 Mar 2011 20:08:59 -0700
Quoted 4 lines
Noticed by sparse:
drivers/net/via-rhine.c:1706:16: warning: cast to restricted__be16Signed-off-by Harvey Harrison <[email protected]>
Applied.