diff mbox series

leds: trigger: stop exporting trigger_list

Message ID ca185fb1-3a66-46b9-920e-bfecbe39c6bf@gmail.com
State New
Headers show
Series leds: trigger: stop exporting trigger_list | expand

Commit Message

Heiner Kallweit Jan. 31, 2024, 2:30 p.m. UTC
682e98564ffb ("leds: trigger: panic: Simplify led_trigger_set_panic")
removed the last external user of variable trigger_list. So stop
exporting it.
If in future a need should arise again to access this variable, I think
we better add some accessor instead of exporting the variable directly.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
applies on top of for-leds-next
---
 drivers/leds/led-triggers.c | 2 +-
 drivers/leds/leds.h         | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

Comments

Lee Jones Feb. 8, 2024, 10:22 a.m. UTC | #1
On Wed, 31 Jan 2024 15:30:53 +0100, Heiner Kallweit wrote:
> 682e98564ffb ("leds: trigger: panic: Simplify led_trigger_set_panic")
> removed the last external user of variable trigger_list. So stop
> exporting it.
> If in future a need should arise again to access this variable, I think
> we better add some accessor instead of exporting the variable directly.
> 
> 
> [...]

Applied, thanks!

[1/1] leds: trigger: stop exporting trigger_list
      commit: 6171582edb46889769d994cca81cf0f0fdd8c66f

--
Lee Jones [李琼斯]
Lee Jones Feb. 8, 2024, 10:23 a.m. UTC | #2
On Thu, 08 Feb 2024, Lee Jones wrote:

> On Wed, 31 Jan 2024 15:30:53 +0100, Heiner Kallweit wrote:
> > 682e98564ffb ("leds: trigger: panic: Simplify led_trigger_set_panic")
> > removed the last external user of variable trigger_list. So stop
> > exporting it.
> > If in future a need should arise again to access this variable, I think
> > we better add some accessor instead of exporting the variable directly.
> > 
> > 
> > [...]
> 
> Applied, thanks!
> 
> [1/1] leds: trigger: stop exporting trigger_list
>       commit: 6171582edb46889769d994cca81cf0f0fdd8c66f

I fixed the chechpatch.pl error for you and changed the subject line to
match the format expected by the LED subsystem.  Please correct these
yourself in subsequent contributions.  Thanks.
Heiner Kallweit Feb. 8, 2024, 10:43 a.m. UTC | #3
On 08.02.2024 11:23, Lee Jones wrote:
> On Thu, 08 Feb 2024, Lee Jones wrote:
> 
>> On Wed, 31 Jan 2024 15:30:53 +0100, Heiner Kallweit wrote:
>>> 682e98564ffb ("leds: trigger: panic: Simplify led_trigger_set_panic")
>>> removed the last external user of variable trigger_list. So stop
>>> exporting it.
>>> If in future a need should arise again to access this variable, I think
>>> we better add some accessor instead of exporting the variable directly.
>>>
>>>
>>> [...]
>>
>> Applied, thanks!
>>
>> [1/1] leds: trigger: stop exporting trigger_list
>>       commit: 6171582edb46889769d994cca81cf0f0fdd8c66f
> 
> I fixed the chechpatch.pl error for you and changed the subject line to
> match the format expected by the LED subsystem.  Please correct these
> yourself in subsequent contributions.  Thanks.
> 
Sure. What was wrong with subject line?
Lee Jones Feb. 8, 2024, 10:45 a.m. UTC | #4
On Thu, 08 Feb 2024, Heiner Kallweit wrote:

> On 08.02.2024 11:23, Lee Jones wrote:
> > On Thu, 08 Feb 2024, Lee Jones wrote:
> > 
> >> On Wed, 31 Jan 2024 15:30:53 +0100, Heiner Kallweit wrote:
> >>> 682e98564ffb ("leds: trigger: panic: Simplify led_trigger_set_panic")
> >>> removed the last external user of variable trigger_list. So stop
> >>> exporting it.
> >>> If in future a need should arise again to access this variable, I think
> >>> we better add some accessor instead of exporting the variable directly.
> >>>
> >>>
> >>> [...]
> >>
> >> Applied, thanks!
> >>
> >> [1/1] leds: trigger: stop exporting trigger_list
> >>       commit: 6171582edb46889769d994cca81cf0f0fdd8c66f
> > 
> > I fixed the chechpatch.pl error for you and changed the subject line to
> > match the format expected by the LED subsystem.  Please correct these
> > yourself in subsequent contributions.  Thanks.
> > 
> Sure. What was wrong with subject line?

Descriptions after the `leds: <device>:` start with an uppercase char.

It's nitty, but consistency helps me sleep at night! :)
Heiner Kallweit Feb. 8, 2024, 10:51 a.m. UTC | #5
On 08.02.2024 11:45, Lee Jones wrote:
> On Thu, 08 Feb 2024, Heiner Kallweit wrote:
> 
>> On 08.02.2024 11:23, Lee Jones wrote:
>>> On Thu, 08 Feb 2024, Lee Jones wrote:
>>>
>>>> On Wed, 31 Jan 2024 15:30:53 +0100, Heiner Kallweit wrote:
>>>>> 682e98564ffb ("leds: trigger: panic: Simplify led_trigger_set_panic")
>>>>> removed the last external user of variable trigger_list. So stop
>>>>> exporting it.
>>>>> If in future a need should arise again to access this variable, I think
>>>>> we better add some accessor instead of exporting the variable directly.
>>>>>
>>>>>
>>>>> [...]
>>>>
>>>> Applied, thanks!
>>>>
>>>> [1/1] leds: trigger: stop exporting trigger_list
>>>>       commit: 6171582edb46889769d994cca81cf0f0fdd8c66f
>>>
>>> I fixed the chechpatch.pl error for you and changed the subject line to
>>> match the format expected by the LED subsystem.  Please correct these
>>> yourself in subsequent contributions.  Thanks.
>>>
>> Sure. What was wrong with subject line?
> 
> Descriptions after the `leds: <device>:` start with an uppercase char.
> 
> It's nitty, but consistency helps me sleep at night! :)
> 
Ah, ok. Thanks.
diff mbox series

Patch

diff --git a/drivers/leds/led-triggers.c b/drivers/leds/led-triggers.c
index 71cb0aee5..371000770 100644
--- a/drivers/leds/led-triggers.c
+++ b/drivers/leds/led-triggers.c
@@ -23,7 +23,7 @@ 
  * Nests outside led_cdev->trigger_lock
  */
 static DECLARE_RWSEM(triggers_list_lock);
-LIST_HEAD(trigger_list);
+static LIST_HEAD(trigger_list);
 
  /* Used by LED Class */
 
diff --git a/drivers/leds/leds.h b/drivers/leds/leds.h
index 345062cca..1138e2ab8 100644
--- a/drivers/leds/leds.h
+++ b/drivers/leds/leds.h
@@ -30,7 +30,6 @@  ssize_t led_trigger_write(struct file *filp, struct kobject *kobj,
 
 extern struct rw_semaphore leds_list_lock;
 extern struct list_head leds_list;
-extern struct list_head trigger_list;
 extern const char * const led_colors[LED_COLOR_ID_MAX];
 
 #endif	/* __LEDS_H_INCLUDED */