Skip to content

Commit

Permalink
net: dpaa: Fix compilation Warning
Browse files Browse the repository at this point in the history
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@debian.org>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Link: https://patch.msgid.link/20240712134817.913756-1-leitao@debian.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Breno Leitao authored and Jakub Kicinski committed Jul 13, 2024
1 parent 3771266 commit e7cdef6
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/net/ethernet/freescale/dpaa/dpaa_eth_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -85,7 +84,6 @@ static ssize_t dpaa_eth_show_fqids(struct device *dev,

prev = fq;
prevstr = str;
i++;
}

if (prev) {
Expand Down

0 comments on commit e7cdef6

Please sign in to comment.