* Re: [PATCH -next] leds: lt3593: remove set but not used variable 'flags'
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
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Pavel Machek @ 2019-03-23 9:29 UTC (permalink / raw)
To: kernel-janitors
[-- 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 --]
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [PATCH -next] leds: lt3593: remove set but not used variable 'flags'
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
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: YueHaibing @ 2019-03-23 9:55 UTC (permalink / raw)
To: kernel-janitors
+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@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.
ok.
>
> 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;
>> }
>> }
>>
>>
>
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [PATCH -next] leds: lt3593: remove set but not used variable 'flags'
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
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Pavel Machek @ 2019-03-23 9:59 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 1037 bytes --]
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@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.
>
> ok.
Does the driver work for you? I mean... take a look at the code, those
flags seem to be needed.
Pavel
--
(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 --]
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [PATCH -next] leds: lt3593: remove set but not used variable 'flags'
2019-03-23 2:45 [PATCH -next] leds: lt3593: remove set but not used variable 'flags' YueHaibing
` (2 preceding siblings ...)
2019-03-23 9:59 ` Pavel Machek
@ 2019-03-23 10:10 ` Daniel Mack
2019-03-23 10:13 ` Daniel Mack
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Daniel Mack @ 2019-03-23 10:10 UTC (permalink / raw)
To: kernel-janitors
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@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.
>>
>> 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
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [PATCH -next] leds: lt3593: remove set but not used variable 'flags'
2019-03-23 2:45 [PATCH -next] leds: lt3593: remove set but not used variable 'flags' YueHaibing
` (3 preceding siblings ...)
2019-03-23 10:10 ` Daniel Mack
@ 2019-03-23 10:13 ` Daniel Mack
2019-03-23 10:15 ` Pavel Machek
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Daniel Mack @ 2019-03-23 10:13 UTC (permalink / raw)
To: kernel-janitors
On 23/3/2019 10:55 AM, YueHaibing wrote:
>>> ---
>>> 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;
>>> }
With only a single statement left in either branch, you can now remove
the curly braces as well.
Thanks,
Daniel
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [PATCH -next] leds: lt3593: remove set but not used variable 'flags'
2019-03-23 2:45 [PATCH -next] leds: lt3593: remove set but not used variable 'flags' YueHaibing
` (4 preceding siblings ...)
2019-03-23 10:13 ` Daniel Mack
@ 2019-03-23 10:15 ` Pavel Machek
2019-03-23 10:25 ` Daniel Mack
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Pavel Machek @ 2019-03-23 10:15 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 1516 bytes --]
On Sat 2019-03-23 11:13:25, Daniel Mack wrote:
> On 23/3/2019 10:55 AM, YueHaibing wrote:
> >>> ---
> >>> 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;
> >>> }
>
> With only a single statement left in either branch, you can now remove
> the curly braces as well.
If I look at code below, there's no difference between DEFSTATE_KEEP
and DEFSTATE_ON, right? I can't see how it works.
Pavel
--
(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 --]
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [PATCH -next] leds: lt3593: remove set but not used variable 'flags'
2019-03-23 2:45 [PATCH -next] leds: lt3593: remove set but not used variable 'flags' YueHaibing
` (5 preceding siblings ...)
2019-03-23 10:15 ` Pavel Machek
@ 2019-03-23 10:25 ` Daniel Mack
2019-03-23 10:34 ` YueHaibing
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Daniel Mack @ 2019-03-23 10:25 UTC (permalink / raw)
To: kernel-janitors
On 23/3/2019 11:15 AM, Pavel Machek wrote:
> On Sat 2019-03-23 11:13:25, Daniel Mack wrote:
>> On 23/3/2019 10:55 AM, YueHaibing wrote:
>>>>> ---
>>>>> 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;
>>>>> }
>>
>> With only a single statement left in either branch, you can now remove
>> the curly braces as well.
>
> If I look at code below, there's no difference between DEFSTATE_KEEP
> and DEFSTATE_ON, right? I can't see how it works.
Ah, you're right. Yes, the "keep" branch needs to go away entirely.
As the chip can't be queried for it's current state, the "keep" option
doesn't make sense. The only option in DT should be turn the LED on or
off at probe time. YueHaibing, can you add that to your patch?
Thanks,
Daniel
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [PATCH -next] leds: lt3593: remove set but not used variable 'flags'
2019-03-23 2:45 [PATCH -next] leds: lt3593: remove set but not used variable 'flags' YueHaibing
` (6 preceding siblings ...)
2019-03-23 10:25 ` Daniel Mack
@ 2019-03-23 10:34 ` YueHaibing
2019-03-23 10:38 ` Daniel Mack
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: YueHaibing @ 2019-03-23 10:34 UTC (permalink / raw)
To: kernel-janitors
On 2019/3/23 18:25, Daniel Mack wrote:
> On 23/3/2019 11:15 AM, Pavel Machek wrote:
>> On Sat 2019-03-23 11:13:25, Daniel Mack wrote:
>>> On 23/3/2019 10:55 AM, YueHaibing wrote:
>>>>>> ---
>>>>>> 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;
>>>>>> }
>>>
>>> With only a single statement left in either branch, you can now remove
>>> the curly braces as well.
>>
>> If I look at code below, there's no difference between DEFSTATE_KEEP
>> and DEFSTATE_ON, right? I can't see how it works.
>
> Ah, you're right. Yes, the "keep" branch needs to go away entirely.
>
> As the chip can't be queried for it's current state, the "keep" option
> doesn't make sense. The only option in DT should be turn the LED on or
> off at probe time. YueHaibing, can you add that to your patch?
Ok. I will send v2 with this.
>
>
> Thanks,
> Daniel
>
>
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [PATCH -next] leds: lt3593: remove set but not used variable 'flags'
2019-03-23 2:45 [PATCH -next] leds: lt3593: remove set but not used variable 'flags' YueHaibing
` (7 preceding siblings ...)
2019-03-23 10:34 ` YueHaibing
@ 2019-03-23 10:38 ` Daniel Mack
2019-03-23 10:44 ` YueHaibing
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Daniel Mack @ 2019-03-23 10:38 UTC (permalink / raw)
To: kernel-janitors
On 23/3/2019 11:34 AM, YueHaibing wrote:
> On 2019/3/23 18:25, Daniel Mack wrote:
>> On 23/3/2019 11:15 AM, Pavel Machek wrote:
>>> If I look at code below, there's no difference between DEFSTATE_KEEP
>>> and DEFSTATE_ON, right? I can't see how it works.
>>
>> Ah, you're right. Yes, the "keep" branch needs to go away entirely.
>>
>> As the chip can't be queried for it's current state, the "keep" option
>> doesn't make sense. The only option in DT should be turn the LED on or
>> off at probe time. YueHaibing, can you add that to your patch?
>
> Ok. I will send v2 with this.
Note that Jacek just applied a patch of mine that removes all pdata
handling from this driver. In order to avoid merge conflicts, you might
want to base your patch on top of that.
https://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds.git/commit/?h=for-next&id½7a59173aea
Thanks,
Daniel
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [PATCH -next] leds: lt3593: remove set but not used variable 'flags'
2019-03-23 2:45 [PATCH -next] leds: lt3593: remove set but not used variable 'flags' YueHaibing
` (8 preceding siblings ...)
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
11 siblings, 0 replies; 13+ messages in thread
From: YueHaibing @ 2019-03-23 10:44 UTC (permalink / raw)
To: kernel-janitors
On 2019/3/23 18:38, Daniel Mack wrote:
> On 23/3/2019 11:34 AM, YueHaibing wrote:
>> On 2019/3/23 18:25, Daniel Mack wrote:
>>> On 23/3/2019 11:15 AM, Pavel Machek wrote:
>
>>>> If I look at code below, there's no difference between DEFSTATE_KEEP
>>>> and DEFSTATE_ON, right? I can't see how it works.
>>>
>>> Ah, you're right. Yes, the "keep" branch needs to go away entirely.
>>>
>>> As the chip can't be queried for it's current state, the "keep" option
>>> doesn't make sense. The only option in DT should be turn the LED on or
>>> off at probe time. YueHaibing, can you add that to your patch?
>>
>> Ok. I will send v2 with this.
>
> Note that Jacek just applied a patch of mine that removes all pdata
> handling from this driver. In order to avoid merge conflicts, you might
> want to base your patch on top of that.
>
>
> https://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds.git/commit/?h=for-next&id½7a59173aea
Yep, this has been linux-next , will based this.
Thanks!
>
>
> Thanks,
> Daniel
>
>
>
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [PATCH -next] leds: lt3593: remove set but not used variable 'flags'
2019-03-23 2:45 [PATCH -next] leds: lt3593: remove set but not used variable 'flags' YueHaibing
` (9 preceding siblings ...)
2019-03-23 10:44 ` YueHaibing
@ 2019-03-23 10:51 ` Pavel Machek
2019-03-23 10:57 ` Daniel Mack
11 siblings, 0 replies; 13+ messages in thread
From: Pavel Machek @ 2019-03-23 10:51 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 1319 bytes --]
On Sat 2019-03-23 11:38:04, Daniel Mack wrote:
> On 23/3/2019 11:34 AM, YueHaibing wrote:
> > On 2019/3/23 18:25, Daniel Mack wrote:
> >> On 23/3/2019 11:15 AM, Pavel Machek wrote:
>
> >>> If I look at code below, there's no difference between DEFSTATE_KEEP
> >>> and DEFSTATE_ON, right? I can't see how it works.
> >>
> >> Ah, you're right. Yes, the "keep" branch needs to go away entirely.
> >>
> >> As the chip can't be queried for it's current state, the "keep" option
> >> doesn't make sense. The only option in DT should be turn the LED on or
> >> off at probe time. YueHaibing, can you add that to your patch?
> >
> > Ok. I will send v2 with this.
>
> Note that Jacek just applied a patch of mine that removes all pdata
> handling from this driver. In order to avoid merge conflicts, you might
> want to base your patch on top of that.
>
Actually, Daniel, at this point I'd prefer you to take over this
patch. You have the hardware and you are already working on the
code...
Pavel
>
> https://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds.git/commit/?h=for-next&id=bd7a59173aea
>
>
> Thanks,
> Daniel
--
(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 --]
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [PATCH -next] leds: lt3593: remove set but not used variable 'flags'
2019-03-23 2:45 [PATCH -next] leds: lt3593: remove set but not used variable 'flags' YueHaibing
` (10 preceding siblings ...)
2019-03-23 10:51 ` Pavel Machek
@ 2019-03-23 10:57 ` Daniel Mack
11 siblings, 0 replies; 13+ messages in thread
From: Daniel Mack @ 2019-03-23 10:57 UTC (permalink / raw)
To: kernel-janitors
On 23/3/2019 11:51 AM, Pavel Machek wrote:
> On Sat 2019-03-23 11:38:04, Daniel Mack wrote:
>> On 23/3/2019 11:34 AM, YueHaibing wrote:
>>> On 2019/3/23 18:25, Daniel Mack wrote:
>>>> On 23/3/2019 11:15 AM, Pavel Machek wrote:
>>
>>>>> If I look at code below, there's no difference between DEFSTATE_KEEP
>>>>> and DEFSTATE_ON, right? I can't see how it works.
>>>>
>>>> Ah, you're right. Yes, the "keep" branch needs to go away entirely.
>>>>
>>>> As the chip can't be queried for it's current state, the "keep" option
>>>> doesn't make sense. The only option in DT should be turn the LED on or
>>>> off at probe time. YueHaibing, can you add that to your patch?
>>>
>>> Ok. I will send v2 with this.
>>
>> Note that Jacek just applied a patch of mine that removes all pdata
>> handling from this driver. In order to avoid merge conflicts, you might
>> want to base your patch on top of that.
>>
>
> Actually, Daniel, at this point I'd prefer you to take over this
> patch. You have the hardware and you are already working on the
> code...
YueHaibing's patch is fine except for the coding style issue. I can send
a 2nd patch on top of that that removes the handling of "keep".
Thanks,
Daniel
^ permalink raw reply [flat|nested] 13+ messages in thread