Skip to contentSkip to conversation

pinctrl: armada-37xx: remove an unused variable

PATCH In review Arnd Bergmann 3 participants 3 messages Mar 22, 2024 – Apr 2, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pinctrl: armada-37xx: remove an unused variable

From: Arnd Bergmann <[email protected]>

This variable has never been used and can be removed to avoid a W=1 warning:

drivers/pinctrl/mvebu/pinctrl-armada-37xx.c:837:6: error: variable 'i' set but not used [-Werror,-Wunused-but-set-variable]
837 | int i = 0;

Fixes 87466ccd9401 ("pinctrl: armada-37xx: Add pin controller support for Armada 37xx")
---
 drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/pinctrl/mvebu/pinctrl-armada-37xx.c +0 -3
index c34719b7506d..4c4ada06423d 100644
@@ -834,8 +834,6 @@ static int armada_37xx_gpiochip_register(struct platform_device *pdev,
 static int armada_37xx_add_function(struct armada_37xx_pmx_func *funcs,
 				    int *funcsize, const char *name)
 {
-	int i = 0;
-
 	if (*funcsize <= 0)
 		return -EOVERFLOW;
 
@@ -847,7 +845,6 @@ static int armada_37xx_add_function(struct armada_37xx_pmx_func *funcs,
 			return -EEXIST;
 		}
 		funcs++;
-		i++;
 	}
 
 	/* append new unique function */
Signature · 1 line
2.39.2
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

This variable has never been used and can be removed to avoid a W=1 warning:

drivers/pinctrl/mvebu/pinctrl-armada-37xx.c:837:6: error: variable 'i' set but not used [-Werror,-Wunused-but-set-variable]
837 | int i = 0;

Fixes 87466ccd9401 ("pinctrl: armada-37xx: Add pin controller support for Armada 37xx")

Andrew

#2 lore raw
In reply to Arnd Bergmann
Quoted 9 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

This variable has never been used and can be removed to avoid a W=1 warning:

drivers/pinctrl/mvebu/pinctrl-armada-37xx.c:837:6: error: variable 'i' set but not used [-Werror,-Wunused-but-set-variable]
837 | int i = 0;

Fixes 87466ccd9401 ("pinctrl: armada-37xx: Add pin controller support for Armada 37xx")

Patch applied!

Yours,
Linus Walleij