提交 4562b2fe 编写于 作者: H Harvey Harrison 提交者: 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: NHarvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册