diff mbox series

[-next] gpio: omap: Remove set but not used variable 'dev'

Message ID 1538101068-160486-1-git-send-email-yuehaibing@huawei.com (mailing list archive)
State New, archived
Headers show
Series [-next] gpio: omap: Remove set but not used variable 'dev' | expand

Commit Message

Yue Haibing Sept. 28, 2018, 2:17 a.m. UTC
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpio/gpio-omap.c: In function 'gpio_omap_cpu_notifier':
drivers/gpio/gpio-omap.c:1327:17: warning:
 variable 'dev' set but not used [-Wunused-but-set-variable]

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

Comments

Tony Lindgren Sept. 28, 2018, 4:50 p.m. UTC | #1
* YueHaibing <yuehaibing@huawei.com> [180928 02:13]:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/gpio/gpio-omap.c: In function 'gpio_omap_cpu_notifier':
> drivers/gpio/gpio-omap.c:1327:17: warning:
>  variable 'dev' set but not used [-Wunused-but-set-variable]
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Thanks for noticing this:

Acked-by: Tony Lindgren <tony@atomide.com>
Linus Walleij Oct. 1, 2018, 11:25 a.m. UTC | #2
On Fri, Sep 28, 2018 at 4:08 AM YueHaibing <yuehaibing@huawei.com> wrote:

> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/gpio/gpio-omap.c: In function 'gpio_omap_cpu_notifier':
> drivers/gpio/gpio-omap.c:1327:17: warning:
>  variable 'dev' set but not used [-Wunused-but-set-variable]
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Patch applied with Tony's ACK.

Yours,
Linus Walleij
diff mbox series

Patch

diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index c0d7ae7..e67d612 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -1324,11 +1324,9 @@  static int gpio_omap_cpu_notifier(struct notifier_block *nb,
 				  unsigned long cmd, void *v)
 {
 	struct gpio_bank *bank;
-	struct device *dev;
 	unsigned long flags;
 
 	bank = container_of(nb, struct gpio_bank, nb);
-	dev = bank->chip.parent;
 
 	raw_spin_lock_irqsave(&bank->lock, flags);
 	switch (cmd) {