* [PATCH] pinctrl: armada-37xx: remove an unused variable
@ 2024-03-22 13:21 Arnd Bergmann
2024-03-22 14:39 ` Andrew Lunn
2024-04-02 12:27 ` Linus Walleij
0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2024-03-22 13:21 UTC (permalink / raw)
To: Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
Linus Walleij
Cc: Arnd Bergmann, linux-arm-kernel, linux-gpio, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
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")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
index c34719b7506d..4c4ada06423d 100644
--- a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
+++ b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
@@ -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 */
--
2.39.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] pinctrl: armada-37xx: remove an unused variable
2024-03-22 13:21 [PATCH] pinctrl: armada-37xx: remove an unused variable Arnd Bergmann
@ 2024-03-22 14:39 ` Andrew Lunn
2024-04-02 12:27 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Andrew Lunn @ 2024-03-22 14:39 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Gregory Clement, Sebastian Hesselbarth, Linus Walleij,
Arnd Bergmann, linux-arm-kernel, linux-gpio, linux-kernel
On Fri, Mar 22, 2024 at 02:21:43PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> 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")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] pinctrl: armada-37xx: remove an unused variable
2024-03-22 13:21 [PATCH] pinctrl: armada-37xx: remove an unused variable Arnd Bergmann
2024-03-22 14:39 ` Andrew Lunn
@ 2024-04-02 12:27 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2024-04-02 12:27 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
Arnd Bergmann, linux-arm-kernel, linux-gpio, linux-kernel
On Fri, Mar 22, 2024 at 2:22 PM Arnd Bergmann <arnd@kernel.org> wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> 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")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Patch applied!
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-04-02 12:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-22 13:21 [PATCH] pinctrl: armada-37xx: remove an unused variable Arnd Bergmann
2024-03-22 14:39 ` Andrew Lunn
2024-04-02 12:27 ` Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).