diff mbox series

[net-next] net: dpaa: Fix compilation Warning

Message ID 20240712134817.913756-1-leitao@debian.org (mailing list archive)
State Accepted
Commit e7cdef626f1d7ca69eb3351a8c4ae6a8ec46feed
Delegated to: Netdev Maintainers
Headers show
Series [net-next] net: dpaa: Fix compilation Warning | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 8 this patch: 8
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 5 of 5 maintainers
netdev/build_clang success Errors and warnings before: 8 this patch: 8
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 8 this patch: 8
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 14 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-07-13--03-00 (tests: 696)

Commit Message

Breno Leitao July 12, 2024, 1:48 p.m. UTC
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>
---
 drivers/net/ethernet/freescale/dpaa/dpaa_eth_sysfs.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Vladimir Oltean July 12, 2024, 1:54 p.m. UTC | #1
On Fri, Jul 12, 2024 at 06:48:16AM -0700, Breno Leitao wrote:
> 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>
patchwork-bot+netdevbpf@kernel.org July 13, 2024, 11 p.m. UTC | #2
Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Fri, 12 Jul 2024 06:48:16 -0700 you wrote:
> 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;
> 	   |             ^
> 
> [...]

Here is the summary with links:
  - [net-next] net: dpaa: Fix compilation Warning
    https://git.kernel.org/netdev/net-next/c/e7cdef626f1d

You are awesome, thank you!
diff mbox series

Patch

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) {