[V2] gpiolib: remove unused variable 'i'
diff mbox

Message ID 20170530110206.785-1-colin.king@canonical.com
State New
Headers show

Commit Message

Colin Ian King May 30, 2017, 11:02 a.m. UTC
From: Colin Ian King <colin.king@canonical.com>

Fixes smatch warning:unused variable 'i' [-Wunused-variable]

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/gpio/gpiolib.c                   | 2 --
 sound/soc/generic/audio-graph-scu-card.c | 2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)


--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Andy Shevchenko May 30, 2017, 1:12 p.m. UTC | #1
On Tue, May 30, 2017 at 2:02 PM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Fixes smatch warning:unused variable 'i' [-Wunused-variable]

Arnd was faster :)

https://lkml.org/lkml/2017/5/30/224

>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/gpio/gpiolib.c                   | 2 --
>  sound/soc/generic/audio-graph-scu-card.c | 2 +-
>  2 files changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
> index be8097097326..62ffb4e293d2 100644
> --- a/drivers/gpio/gpiolib.c
> +++ b/drivers/gpio/gpiolib.c
> @@ -1471,8 +1471,6 @@ static struct gpio_chip *find_chip_by_name(const char *name)
>
>  static int gpiochip_irqchip_init_valid_mask(struct gpio_chip *gpiochip)
>  {
> -       int i;
> -
>         if (!gpiochip->irq_need_valid_mask)
>                 return 0;
>
>

Patch
diff mbox

diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index be8097097326..62ffb4e293d2 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -1471,8 +1471,6 @@  static struct gpio_chip *find_chip_by_name(const char *name)
 
 static int gpiochip_irqchip_init_valid_mask(struct gpio_chip *gpiochip)
 {
-	int i;
-
 	if (!gpiochip->irq_need_valid_mask)
 		return 0;