Re: [PATCH -next] leds: lt3593: remove set but not used variable 'flags'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 23/3/2019 10:59 AM, Pavel Machek wrote:
> On Sat 2019-03-23 17:55:59, YueHaibing wrote:
>> +cc Daniel Mack
>>
>> On 2019/3/23 17:29, Pavel Machek wrote:
>>> 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@xxxxxxxxxx>
>>>
>>> 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.
>>
>> ok.
> 
> Does the driver work for you? I mean... take a look at the code, those
> flags seem to be needed.

No. It's in fact an oversight introduced in 8cd7d6daba93 ("leds: lt3593:
Add device tree probing glue"). I likely copied the code to parse the
"default-state" property from the gpio-led driver, but all it would have
needed is the assignment of "state", not "flags". The latter can be
removed. Thanks for noting, YueHaibing.

I can't seem to find the patch anywhere in the archives though.


Daniel





[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux