gpio: htc-egpio: Remove set but not used variable 'bit'
authorYueHaibing <yuehaibing@huawei.com>
Fri, 28 Sep 2018 02:18:09 +0000 (02:18 +0000)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 1 Oct 2018 10:27:19 +0000 (12:27 +0200)
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>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-htc-egpio.c

index 38be44dbd6e14d02d62199125ae7400151f8c08d..9d3ac51a765c1405b4fe0ec68e2beec9b2dd1dfd 100644 (file)
@@ -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;