Skip to contentSkip to conversation

staging: wfx: remove set but not used variable 'tx_priv'

PATCH In review YueHaibing 2 participants 3 messages Feb 11, 2020 Staging

lore
Share & tools
lore

YueHaibing

author
#0 lore raw

PATCH 1/1 staging: wfx: remove set but not used variable 'tx_priv'

drivers/staging/wfx/queue.c: In function wfx_tx_queues_get:
drivers/staging/wfx/queue.c:484:28: warning: variable tx_priv set but not used [-Wunused-but-set-variable]

commit 2e57865e79cf ("staging: wfx: pspoll_mask make no sense") left behind this unused variable.

---
 drivers/staging/wfx/queue.c | 2 --
 1 file changed, 2 deletions(-)
drivers/staging/wfx/queue.c +0 -2
index 0bcc61f..c73d158 100644
@@ -481,7 +481,6 @@ struct hif_msg *wfx_tx_queues_get(struct wfx_dev *wdev)
 	struct wfx_queue *vif_queue = NULL;
 	u32 tx_allowed_mask = 0;
 	u32 vif_tx_allowed_mask = 0;
-	const struct wfx_tx_priv *tx_priv = NULL;
 	struct wfx_vif *wvif;
 	int not_found;
 	int burst;
@@ -541,7 +540,6 @@ struct hif_msg *wfx_tx_queues_get(struct wfx_dev *wdev)
 		skb = wfx_tx_queue_get(wdev, queue, tx_allowed_mask);
 		if (!skb)
 			continue;
-		tx_priv = wfx_skb_tx_priv(skb);
 		hif = (struct hif_msg *) skb->data;
 		wvif = wdev_to_wvif(wdev, hif->interface);
 		WARN_ON(!wvif);
Signature · 1 line
2.7.4
Reviewed-by on v1 1/1
#1 lore raw
Quoted 33 lines · On Tuesday 11 February 2020 15:03:34 CET YueHaibing wrote:

drivers/staging/wfx/queue.c: In function wfx_tx_queues_get:
drivers/staging/wfx/queue.c:484:28: warning: variable tx_priv set but not used [-Wunused-but-set-variable]

commit 2e57865e79cf ("staging: wfx: pspoll_mask make no sense") left behind this unused variable.

---
 drivers/staging/wfx/queue.c | 2 --
 1 file changed, 2 deletions(-)
drivers/staging/wfx/queue.c +0 -3
index 0bcc61f..c73d158 100644
@@ -481,7 +481,6 @@ struct hif_msg *wfx_tx_queues_get(struct wfx_dev *wdev)
        struct wfx_queue *vif_queue = NULL;
        u32 tx_allowed_mask = 0;
        u32 vif_tx_allowed_mask = 0;
-       const struct wfx_tx_priv *tx_priv = NULL;
        struct wfx_vif *wvif;
        int not_found;
        int burst;
@@ -541,7 +540,6 @@ struct hif_msg *wfx_tx_queues_get(struct wfx_dev *wdev)
                skb = wfx_tx_queue_get(wdev, queue, tx_allowed_mask);
                if (!skb)
                        continue;
-               tx_priv = wfx_skb_tx_priv(skb);
                hif = (struct hif_msg *) skb->data;
                wvif = wdev_to_wvif(wdev, hif->interface);
                WARN_ON(!wvif);
--
Quoted 1 line

2.7.4

Signature · 1 line
Jérôme Pouiller
#2 lore raw
Quoted 9 lines · On Tuesday 11 February 2020 16:21:41 CET Jérôme Pouiller wrote:
Quoted 8 lines · On Tuesday 11 February 2020 15:03:34 CET YueHaibing wrote:

drivers/staging/wfx/queue.c: In function wfx_tx_queues_get:
drivers/staging/wfx/queue.c:484:28: warning: variable tx_priv set but not used [-Wunused-but-set-variable]

commit 2e57865e79cf ("staging: wfx: pspoll_mask make no sense") left behind this unused variable.

Maybe it could make sens to add a Fixes tag with the commit id that introduce the warning?

Signature · 1 line
Jérôme Pouiller