* [PATCH -next] gpiolib: remove set but not used variable 'config'
@ 2020-01-08 12:11 YueHaibing
2020-01-08 13:07 ` Bartosz Golaszewski
2020-01-15 13:39 ` Linus Walleij
0 siblings, 2 replies; 3+ messages in thread
From: YueHaibing @ 2020-01-08 12:11 UTC (permalink / raw)
To: linus.walleij, bgolaszewski; +Cc: linux-gpio, linux-kernel, YueHaibing
drivers/gpio/gpiolib.c: In function gpio_set_config:
drivers/gpio/gpiolib.c:3053:16: warning:
variable config set but not used [-Wunused-but-set-variable]
commit d90f36851d65 ("gpiolib: have a single place
of calling set_config()") left behind this unused variable.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/gpio/gpiolib.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 9fd2dfb..aabf801 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -3050,7 +3050,6 @@ static int gpio_do_set_config(struct gpio_chip *gc, unsigned int offset,
static int gpio_set_config(struct gpio_chip *gc, unsigned int offset,
enum pin_config_param mode)
{
- unsigned long config;
unsigned arg;
switch (mode) {
@@ -3064,7 +3063,6 @@ static int gpio_set_config(struct gpio_chip *gc, unsigned int offset,
arg = 0;
}
- config = PIN_CONF_PACKED(mode, arg);
return gpio_do_set_config(gc, offset, mode);
}
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -next] gpiolib: remove set but not used variable 'config'
2020-01-08 12:11 [PATCH -next] gpiolib: remove set but not used variable 'config' YueHaibing
@ 2020-01-08 13:07 ` Bartosz Golaszewski
2020-01-15 13:39 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Bartosz Golaszewski @ 2020-01-08 13:07 UTC (permalink / raw)
To: YueHaibing; +Cc: Linus Walleij, linux-gpio, LKML
śr., 8 sty 2020 o 13:11 YueHaibing <yuehaibing@huawei.com> napisał(a):
>
> drivers/gpio/gpiolib.c: In function gpio_set_config:
> drivers/gpio/gpiolib.c:3053:16: warning:
> variable config set but not used [-Wunused-but-set-variable]
>
> commit d90f36851d65 ("gpiolib: have a single place
> of calling set_config()") left behind this unused variable.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> drivers/gpio/gpiolib.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
> index 9fd2dfb..aabf801 100644
> --- a/drivers/gpio/gpiolib.c
> +++ b/drivers/gpio/gpiolib.c
> @@ -3050,7 +3050,6 @@ static int gpio_do_set_config(struct gpio_chip *gc, unsigned int offset,
> static int gpio_set_config(struct gpio_chip *gc, unsigned int offset,
> enum pin_config_param mode)
> {
> - unsigned long config;
> unsigned arg;
>
> switch (mode) {
> @@ -3064,7 +3063,6 @@ static int gpio_set_config(struct gpio_chip *gc, unsigned int offset,
> arg = 0;
> }
>
> - config = PIN_CONF_PACKED(mode, arg);
> return gpio_do_set_config(gc, offset, mode);
> }
>
Reviewed-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next] gpiolib: remove set but not used variable 'config'
2020-01-08 12:11 [PATCH -next] gpiolib: remove set but not used variable 'config' YueHaibing
2020-01-08 13:07 ` Bartosz Golaszewski
@ 2020-01-15 13:39 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2020-01-15 13:39 UTC (permalink / raw)
To: YueHaibing; +Cc: Bartosz Golaszewski, open list:GPIO SUBSYSTEM, linux-kernel
On Wed, Jan 8, 2020 at 1:11 PM YueHaibing <yuehaibing@huawei.com> wrote:
> drivers/gpio/gpiolib.c: In function gpio_set_config:
> drivers/gpio/gpiolib.c:3053:16: warning:
> variable config set but not used [-Wunused-but-set-variable]
>
> commit d90f36851d65 ("gpiolib: have a single place
> of calling set_config()") left behind this unused variable.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Patch applied with Bartosz' review tag.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-01-15 13:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-08 12:11 [PATCH -next] gpiolib: remove set but not used variable 'config' YueHaibing
2020-01-08 13:07 ` Bartosz Golaszewski
2020-01-15 13:39 ` 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).