[-next] gpio: htc-egpio: Remove set but not used variable 'bit'
diff mbox series

Message ID 1538101089-160557-1-git-send-email-yuehaibing@huawei.com
State New
Headers show
Series
  • [-next] gpio: htc-egpio: Remove set but not used variable 'bit'
Related show

Commit Message

YueHaibing Sept. 28, 2018, 2:18 a.m. UTC
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpio/gpio-htc-egpio.c: In function 'egpio_set':
drivers/gpio/gpio-htc-egpio.c:192:20: warning:
 variable 'bit' set but not used [-Wunused-but-set-variable]

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/gpio/gpio-htc-egpio.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Linus Walleij Oct. 1, 2018, 10:28 a.m. UTC | #1
On Fri, Sep 28, 2018 at 4:09 AM YueHaibing <yuehaibing@huawei.com> wrote:

> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/gpio/gpio-htc-egpio.c: In function 'egpio_set':
> drivers/gpio/gpio-htc-egpio.c:192:20: warning:
>  variable 'bit' set but not used [-Wunused-but-set-variable]
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Patch applied.

Yours,
Linus Walleij

Patch
diff mbox series

diff --git a/drivers/gpio/gpio-htc-egpio.c b/drivers/gpio/gpio-htc-egpio.c
index 38be44d..9d3ac51 100644
--- a/drivers/gpio/gpio-htc-egpio.c
+++ b/drivers/gpio/gpio-htc-egpio.c
@@ -189,7 +189,6 @@  static void egpio_set(struct gpio_chip *chip, unsigned offset, int value)
 	unsigned long     flag;
 	struct egpio_chip *egpio;
 	struct egpio_info *ei;
-	unsigned          bit;
 	int               pos;
 	int               reg;
 	int               shift;
@@ -199,7 +198,6 @@  static void egpio_set(struct gpio_chip *chip, unsigned offset, int value)
 
 	egpio = gpiochip_get_data(chip);
 	ei    = dev_get_drvdata(egpio->dev);
-	bit   = egpio_bit(ei, offset);
 	pos   = egpio_pos(ei, offset);
 	reg   = egpio->reg_start + pos;
 	shift = pos << ei->reg_shift;