diff mbox

gpiolib: remove unused variable

Message ID 20170530092128.1180841-1-arnd@arndb.de
State New
Headers show

Commit Message

Arnd Bergmann May 30, 2017, 9:21 a.m. UTC
This was left behind by a cleanup patch:

drivers/gpio/gpiolib.c: In function 'gpiochip_irqchip_init_valid_mask':
drivers/gpio/gpiolib.c:1474:6: error: unused variable 'i' [-Werror=unused-variable]

Fixes: 923a654c186c ("gpiolib: Re-use bitmap_fill() instead of open coded loop")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/gpio/gpiolib.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Andy Shevchenko May 30, 2017, 10:07 a.m. UTC | #1
On Tue, 2017-05-30 at 11:21 +0200, Arnd Bergmann wrote:
> This was left behind by a cleanup patch:
> 
> drivers/gpio/gpiolib.c: In function
> 'gpiochip_irqchip_init_valid_mask':
> drivers/gpio/gpiolib.c:1474:6: error: unused variable 'i' [-
> Werror=unused-variable]


Right, thanks for it!
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

> 
> Fixes: 923a654c186c ("gpiolib: Re-use bitmap_fill() instead of open
> coded loop")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/gpio/gpiolib.c | 2 --
>  1 file changed, 2 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;
>
Linus Walleij May 30, 2017, 11:57 p.m. UTC | #2
On Tue, May 30, 2017 at 11:21 AM, Arnd Bergmann <arnd@arndb.de> wrote:

> This was left behind by a cleanup patch:
>
> drivers/gpio/gpiolib.c: In function 'gpiochip_irqchip_init_valid_mask':
> drivers/gpio/gpiolib.c:1474:6: error: unused variable 'i' [-Werror=unused-variable]
>
> Fixes: 923a654c186c ("gpiolib: Re-use bitmap_fill() instead of open coded loop")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Patch applied.

Yours,
Linus Walleij
--
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
diff mbox

Patch

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;