[PATCH net-next] net: ethernet: mtk_eth_soc: remove unused variable 'count'

Subsystems: mediatek ethernet driver, networking drivers, the rest

STALE1955d

2 messages, 2 authors, 2021-03-26 · open the first message on its own page

[PATCH net-next] net: ethernet: mtk_eth_soc: remove unused variable 'count'

From: Qiheng Lin <hidden>
Date: 2021-03-25 09:40:31

GCC reports the following warning with W=1:

drivers/net/ethernet/mediatek/mtk_ppe_debugfs.c:80:9: warning:
 variable 'count' set but not used [-Wunused-but-set-variable]
   80 |  int i, count;
      |         ^~~~~

This variable is not used in function , this commit
remove it to fix the warning.

Reported-by: Hulk Robot <redacted>
Signed-off-by: Qiheng Lin <redacted>
---
 drivers/net/ethernet/mediatek/mtk_ppe_debugfs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/mediatek/mtk_ppe_debugfs.c b/drivers/net/ethernet/mediatek/mtk_ppe_debugfs.c
index 8ae9efab6d02..98b1d3577bcd 100644
--- a/drivers/net/ethernet/mediatek/mtk_ppe_debugfs.c
+++ b/drivers/net/ethernet/mediatek/mtk_ppe_debugfs.c
@@ -77,9 +77,9 @@ static int
 mtk_ppe_debugfs_foe_show(struct seq_file *m, void *private, bool bind)
 {
 	struct mtk_ppe *ppe = m->private;
-	int i, count;
+	int i;
 
-	for (i = 0, count = 0; i < MTK_PPE_ENTRIES; i++) {
+	for (i = 0; i < MTK_PPE_ENTRIES; i++) {
 		struct mtk_foe_entry *entry = &ppe->foe_table[i];
 		struct mtk_foe_mac_info *l2;
 		struct mtk_flow_addr_info ai = {};
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Re: [PATCH net-next] net: ethernet: mtk_eth_soc: remove unused variable 'count'

From: patchwork-bot+netdevbpf@kernel.org
Date: 2021-03-26 00:32:05

Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

On Thu, 25 Mar 2021 17:31:51 +0800 you wrote:
GCC reports the following warning with W=1:

drivers/net/ethernet/mediatek/mtk_ppe_debugfs.c:80:9: warning:
 variable 'count' set but not used [-Wunused-but-set-variable]
   80 |  int i, count;
      |         ^~~~~

[...]
Here is the summary with links:
  - [net-next] net: ethernet: mtk_eth_soc: remove unused variable 'count'
    https://git.kernel.org/netdev/net-next/c/ae8f5867d590

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help