From: Pavel Machek <pavel@ucw.cz>
To: kernel-janitors@vger.kernel.org
Subject: Re: [PATCH -next] leds: lt3593: remove set but not used variable 'flags'
Date: Sat, 23 Mar 2019 09:29:04 +0000 [thread overview]
Message-ID: <20190323092904.GA24127@amd> (raw)
In-Reply-To: <20190323024523.162210-1-yuehaibing@huawei.com>
[-- Attachment #1: Type: text/plain, Size: 1717 bytes --]
On Sat 2019-03-23 02:45:23, YueHaibing wrote:
> 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>
Does the driver work for you? I mean... take a look at the code, those
flags seem to be needed.
You probably want to cc original author of the commit.
Pavel
> ---
> 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;
> }
> }
>
>
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
next prev parent reply other threads:[~2019-03-23 9:29 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-23 2:45 [PATCH -next] leds: lt3593: remove set but not used variable 'flags' YueHaibing
2019-03-23 9:29 ` Pavel Machek [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190323092904.GA24127@amd \
--to=pavel@ucw.cz \
--cc=kernel-janitors@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.