[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240712134817.913756-1-leitao@debian.org>
Date: Fri, 12 Jul 2024 06:48:16 -0700
From: Breno Leitao <leitao@...ian.org>
To: Madalin Bucur <madalin.bucur@....com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>
Cc: leit@...a.com,
netdev@...r.kernel.org (open list:FREESCALE QORIQ DPAA ETHERNET DRIVER),
linux-kernel@...r.kernel.org (open list)
Subject: [PATCH net-next] net: dpaa: Fix compilation Warning
Remove variables that are defined and incremented but never read.
This issue appeared in network tests[1] as:
drivers/net/ethernet/freescale/dpaa/dpaa_eth_sysfs.c:38:6: warning: variable 'i' set but not used [-Wunused-but-set-variable]
38 | int i = 0;
| ^
Link: https://netdev.bots.linux.dev/static/nipa/870263/13729811/build_clang/stderr [1]
Signed-off-by: Breno Leitao <leitao@...ian.org>
---
drivers/net/ethernet/freescale/dpaa/dpaa_eth_sysfs.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth_sysfs.c b/drivers/net/ethernet/freescale/dpaa/dpaa_eth_sysfs.c
index 4fee74c024bd..aad470e9caea 100644
--- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth_sysfs.c
+++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth_sysfs.c
@@ -35,7 +35,6 @@ static ssize_t dpaa_eth_show_fqids(struct device *dev,
u32 last_fqid = 0;
ssize_t bytes = 0;
char *str;
- int i = 0;
list_for_each_entry_safe(fq, tmp, &priv->dpaa_fq_list, list) {
switch (fq->fq_type) {
@@ -85,7 +84,6 @@ static ssize_t dpaa_eth_show_fqids(struct device *dev,
prev = fq;
prevstr = str;
- i++;
}
if (prev) {
--
2.43.0
Powered by blists - more mailing lists