Skip to contentSkip to conversation

mt76: remove variable set but not used

PATCH Applied Yang Li 2 participants 2 messages Dec 13, 2021

Subsystems (4)
lore
Share & tools
lore

Yang Li

author
#0 lore raw

PATCH 1/1 mt76: remove variable set but not used

The code that uses variable queued has been removed, and "mt76_is_usb(dev) ? q->ndesc - q->queued : q->queued" didn't do anything, so all they should be removed as well.

Eliminate the following clang warnings:
drivers/net/wireless/mediatek/mt76/debugfs.c:77:9: warning: variable ‘queued’ set but not used.

Fixes 2d8be76c1674 ("mt76: debugfs: improve queue node readability")
---
 drivers/net/wireless/mediatek/mt76/debugfs.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/wireless/mediatek/mt76/debugfs.c +1 -2
index b8bcf22a07fd..027d9ea17d04 100644
@@ -74,13 +74,12 @@ EXPORT_SYMBOL_GPL(mt76_queues_read);
 static int mt76_rx_queues_read(struct seq_file *s, void *data)
 {
 	struct mt76_dev *dev = dev_get_drvdata(s->private);
-	int i, queued;
+	int i;
 
 	seq_puts(s, "     queue | hw-queued |      head |      tail |\n");
 	mt76_for_each_q_rx(dev, i) {
 		struct mt76_queue *q = &dev->q_rx[i];
 
-		queued = mt76_is_usb(dev) ? q->ndesc - q->queued : q->queued;
 		seq_printf(s, " %9d | %9d | %9d | %9d |\n",
 			   i, q->queued, q->head, q->tail);
 	}
Signature · 1 line
2.20.1.7.g153144c
#1 lore raw
This patch was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:

Quoted 9 lines · On Mon, 13 Dec 2021 17:54:13 +0800 you wrote:

The code that uses variable queued has been removed, and "mt76_is_usb(dev) ? q->ndesc - q->queued : q->queued" didn't do anything, so all they should be removed as well.

Eliminate the following clang warnings:
drivers/net/wireless/mediatek/mt76/debugfs.c:77:9: warning: variable ‘queued’ set but not used.

[...]

Here is the summary with links:
- [-next] mt76: remove variable set but not used

    https://git.kernel.org/netdev/net-next/c/93d576f54e0f

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html