mbox series

[0/6] leds: Remove local leds.h where not required

Message ID 20240927-leds_unused_leds_h-v1-0-46fbf41ed4ae@gmail.com
Headers show
Series leds: Remove local leds.h where not required | expand

Message

Javier Carrasco Sept. 27, 2024, 9:37 p.m. UTC
There is a logical tendency to move elements from the local leds.h to
the global one under include/linux/ to make them accessible for users
outside the leds subsystem. On the other hand, some users of the local
header, which also include the global one, do not need to include it
anymore as the elements they required are no longer there.

That has been the case for leds-gpio and leds-pwm, which used to obtain
led_init_default_state_get() from that header. I could not identify the
reason why the rest of affected drivers included leds.h from the
beginning, but I suppose they used to require something that might not
be there anymore, or it was just added "by default". Either way, they
don't require it in their current form.

This series has been validated by building the kernel with both Clang
and GCC without any issues.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
---
Javier Carrasco (6):
      leds: flash: Remove unused local leds.h
      leds: multicolor: Remove unused local leds.h
      leds: gpio: Remove unused local leds.h
      leds: lp50xx: Remove unused local leds.h
      leds: pwm: Remove unused local leds.h
      leds: turris-omnia: Remove unused local leds.h

 drivers/leds/led-class-flash.c      | 1 -
 drivers/leds/led-class-multicolor.c | 2 --
 drivers/leds/leds-gpio.c            | 2 --
 drivers/leds/leds-lp50xx.c          | 2 --
 drivers/leds/leds-pwm.c             | 1 -
 drivers/leds/leds-turris-omnia.c    | 1 -
 6 files changed, 9 deletions(-)
---
base-commit: 40e0c9d414f57d450e3ad03c12765e797fc3fede
change-id: 20240927-leds_unused_leds_h-af790ac75d80

Best regards,

Comments

Lee Jones Oct. 9, 2024, 2:37 p.m. UTC | #1
On Fri, 27 Sep 2024 23:37:39 +0200, Javier Carrasco wrote:
> There is a logical tendency to move elements from the local leds.h to
> the global one under include/linux/ to make them accessible for users
> outside the leds subsystem. On the other hand, some users of the local
> header, which also include the global one, do not need to include it
> anymore as the elements they required are no longer there.
> 
> That has been the case for leds-gpio and leds-pwm, which used to obtain
> led_init_default_state_get() from that header. I could not identify the
> reason why the rest of affected drivers included leds.h from the
> beginning, but I suppose they used to require something that might not
> be there anymore, or it was just added "by default". Either way, they
> don't require it in their current form.
> 
> [...]

Applied, thanks!

[1/6] leds: flash: Remove unused local leds.h
      commit: 827a0a3724c5e516b7c0dbfd3f0d907dc947a10b
[2/6] leds: multicolor: Remove unused local leds.h
      commit: 026432e7c26484eb613d8224c98e554c7bc7d768
[3/6] leds: gpio: Remove unused local leds.h
      commit: e7160d5ee369c016418ba239516d24f086130aa4
[4/6] leds: lp50xx: Remove unused local leds.h
      commit: d1aa93196ca601472f4300bed103ce74ff2e8a2b
[5/6] leds: pwm: Remove unused local leds.h
      commit: 9fd316962a2089f25db286c1042eeba3f08a2bed
[6/6] leds: turris-omnia: Remove unused local leds.h
      commit: 3cfd6ad3e1d9ea4ae2e13d384c3c95726593dae2

--
Lee Jones [李琼斯]