[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1301368139-2489-1-git-send-email-harvey.harrison@gmail.com>
Date: Mon, 28 Mar 2011 20:08:59 -0700
From: Harvey Harrison <harvey.harrison@...il.com>
To: netdev@...r.kernel.org
Subject: [PATCH] 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 <harvey.harrison@...il.com>
---
drivers/net/via-rhine.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/via-rhine.c b/drivers/net/via-rhine.c
index 5e7f069..707f7f8 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 */
--
1.7.4
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists