Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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@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>

authored by

Breno Leitao and committed by
Jakub Kicinski
e7cdef62 3771266b

-2
-2
drivers/net/ethernet/freescale/dpaa/dpaa_eth_sysfs.c
··· 35 35 u32 last_fqid = 0; 36 36 ssize_t bytes = 0; 37 37 char *str; 38 - int i = 0; 39 38 40 39 list_for_each_entry_safe(fq, tmp, &priv->dpaa_fq_list, list) { 41 40 switch (fq->fq_type) { ··· 84 85 85 86 prev = fq; 86 87 prevstr = str; 87 - i++; 88 88 } 89 89 90 90 if (prev) {