Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1733067

[PATCH] [media] solo6x10: hide unused variable

From Arnd Bergmann <arnd@arndb.de>
Newsgroups linux.kernel
Subject [PATCH] [media] solo6x10: hide unused variable
Date 2017-09-15 22:00 +0200
Message-ID <uq4Wn-7vc-23@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


When building without CONFIG_GPIOLIB, we get a harmless
warning about an unused variable:

drivers/media/pci/solo6x10/solo6x10-gpio.c: In function 'solo_gpio_init':
drivers/media/pci/solo6x10/solo6x10-gpio.c:165:6: error: unused variable 'ret' [-Werror=unused-variable]

This adds another #ifdef around the declaration.

Fixes: d3202d1981dc ("media: solo6x10: export hardware GPIO pins 8:31 to gpiolib interface")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/media/pci/solo6x10/solo6x10-gpio.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/media/pci/solo6x10/solo6x10-gpio.c b/drivers/media/pci/solo6x10/solo6x10-gpio.c
index 3d0d1aa2f6a8..7b4641a2cb84 100644
--- a/drivers/media/pci/solo6x10/solo6x10-gpio.c
+++ b/drivers/media/pci/solo6x10/solo6x10-gpio.c
@@ -162,7 +162,9 @@ static void solo_gpiochip_set(struct gpio_chip *chip,
 
 int solo_gpio_init(struct solo_dev *solo_dev)
 {
+#ifdef CONFIG_GPIOLIB
 	int ret;
+#endif
 
 	solo_gpio_config(solo_dev);
 #ifdef CONFIG_GPIOLIB
-- 
2.9.0

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] [media] solo6x10: hide unused variable Arnd Bergmann <arnd@arndb.de> - 2017-09-15 22:00 +0200
  Re: [PATCH] [media] solo6x10: hide unused variable Ismael Luceno <ismael@iodev.co.uk> - 2017-09-16 01:40 +0200
  Re: [PATCH] [media] solo6x10: hide unused variable Anton Sviridenko <anton@corp.bluecherry.net> - 2017-09-16 13:00 +0200

csiph-web