netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: intel: fm10k: Fix parameter idx set but not used
@ 2025-09-01 21:31 Brahmajit Das
  2025-09-01 22:13 ` Vadim Fedorenko
  2025-09-03  6:09 ` [Intel-wired-lan] [PATCH] " Loktionov, Aleksandr
  0 siblings, 2 replies; 10+ messages in thread
From: Brahmajit Das @ 2025-09-01 21:31 UTC (permalink / raw)
  To: netdev, intel-wired-lan
  Cc: anthony.l.nguyen, przemyslaw.kitszel, andrew+netdev, davem, kuba,
	listout

Variable idx is set in the loop, but is never used resulting in dead
code. Building with GCC 16, which enables
-Werror=unused-but-set-parameter= by default results in build error.
This patch removes the dead code and fixes the build error.

Signed-off-by: Brahmajit Das <listout@listout.xyz>
---
 drivers/net/ethernet/intel/fm10k/fm10k_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_common.c b/drivers/net/ethernet/intel/fm10k/fm10k_common.c
index f51a63fca513..2fcbbd5accc2 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_common.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_common.c
@@ -457,7 +457,7 @@ void fm10k_unbind_hw_stats_q(struct fm10k_hw_stats_q *q, u32 idx, u32 count)
 {
 	u32 i;
 
-	for (i = 0; i < count; i++, idx++, q++) {
+	for (i = 0; i < count; i++, q++) {
 		q->rx_stats_idx = 0;
 		q->tx_stats_idx = 0;
 	}
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2025-09-03  9:15 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-01 21:31 [PATCH] net: intel: fm10k: Fix parameter idx set but not used Brahmajit Das
2025-09-01 22:13 ` Vadim Fedorenko
2025-09-02  7:24   ` [PATCH v2] " Brahmajit Das
2025-09-02  7:41     ` Vadim Fedorenko
2025-09-02 10:34     ` Vadim Fedorenko
2025-09-02 10:47       ` Brahmajit Das
2025-09-03  6:08     ` [Intel-wired-lan] " Loktionov, Aleksandr
2025-09-03  9:11       ` Brahmajit Das
2025-09-03  9:15         ` Loktionov, Aleksandr
2025-09-03  6:09 ` [Intel-wired-lan] [PATCH] " Loktionov, Aleksandr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).