Commit 4562b2fe authored by Harvey Harrison's avatar Harvey Harrison Committed by David S. Miller

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: default avatarHarvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 19eccc2b
......@@ -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 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment