From 7ad82572348c39ce19ba5ab8afe21e560a8d2c96 Mon Sep 17 00:00:00 2001 From: Himangi Saraogi Date: Mon, 10 Mar 2014 16:05:27 +0530 Subject: [PATCH] staging:wlan-ng:Fix sparse warning This patch fixes the sparse warning - drivers/staging/wlan-ng/p80211netdev.c:289:38: warning: cast to restricted __le16 by eliminating the variable fc as it is not required. Signed-off-by: Himangi Saraogi --- drivers/staging/wlan-ng/p80211netdev.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/wlan-ng/p80211netdev.c b/drivers/staging/wlan-ng/p80211netdev.c index 0039e082507d..e3ae8024d3a4 100644 --- a/drivers/staging/wlan-ng/p80211netdev.c +++ b/drivers/staging/wlan-ng/p80211netdev.c @@ -262,7 +262,6 @@ static void p80211netdev_rx_bh(unsigned long arg) struct sk_buff *skb = NULL; netdevice_t *dev = wlandev->netdev; struct p80211_hdr_a3 *hdr; - u16 fc; /* Let's empty our our queue */ while ((skb = skb_dequeue(&wlandev->nsd_rxq))) { @@ -286,8 +285,7 @@ static void p80211netdev_rx_bh(unsigned long arg) continue; } else { hdr = (struct p80211_hdr_a3 *) skb->data; - fc = le16_to_cpu(hdr->fc); - if (p80211_rx_typedrop(wlandev, fc)) { + if (p80211_rx_typedrop(wlandev, hdr->fc)) { dev_kfree_skb(skb); continue; } -- 2.20.1