All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] leds: lt3593: remove set but not used variable 'flags'
@ 2019-03-23  2:45 YueHaibing
  2019-03-23  9:29 ` Pavel Machek
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: YueHaibing @ 2019-03-23  2:45 UTC (permalink / raw)
  To: kernel-janitors

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/leds/leds-lt3593.c: In function 'lt3593_led_probe':
drivers/leds/leds-lt3593.c:69:19: warning:
 variable 'flags' set but not used [-Wunused-but-set-variable]

It's never used since inroduction in
commit 8cd7d6daba93 ("leds: lt3593: Add device tree probing glue")

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

diff --git a/drivers/leds/leds-lt3593.c b/drivers/leds/leds-lt3593.c
index 54f0e5dbdbd0..912b8d1bbd92 100644
--- a/drivers/leds/leds-lt3593.c
+++ b/drivers/leds/leds-lt3593.c
@@ -66,7 +66,6 @@ static int lt3593_led_probe(struct platform_device *pdev)
 	struct lt3593_led_data *led_data;
 	struct fwnode_handle *child;
 	int ret, state = LEDS_GPIO_DEFSTATE_OFF;
-	enum gpiod_flags flags = GPIOD_OUT_LOW;
 	const char *tmp;
 
 	if (!dev->of_node)
@@ -101,10 +100,8 @@ static int lt3593_led_probe(struct platform_device *pdev)
 	if (!fwnode_property_read_string(child, "default-state", &tmp)) {
 		if (!strcmp(tmp, "keep")) {
 			state = LEDS_GPIO_DEFSTATE_KEEP;
-			flags = GPIOD_ASIS;
 		} else if (!strcmp(tmp, "on")) {
 			state = LEDS_GPIO_DEFSTATE_ON;
-			flags = GPIOD_OUT_HIGH;
 		}
 	}

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2019-03-23 10:57 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-23  2:45 [PATCH -next] leds: lt3593: remove set but not used variable 'flags' YueHaibing
2019-03-23  9:29 ` Pavel Machek
2019-03-23  9:55 ` YueHaibing
2019-03-23  9:59 ` Pavel Machek
2019-03-23 10:10 ` Daniel Mack
2019-03-23 10:13 ` Daniel Mack
2019-03-23 10:15 ` Pavel Machek
2019-03-23 10:25 ` Daniel Mack
2019-03-23 10:34 ` YueHaibing
2019-03-23 10:38 ` Daniel Mack
2019-03-23 10:44 ` YueHaibing
2019-03-23 10:51 ` Pavel Machek
2019-03-23 10:57 ` Daniel Mack

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.