leds: expresswire: Don't use "proxy" headers
Subsystems (2)
PATCH v2 1/1 leds: expresswire: Don't use "proxy" headers
Update header inclusions to follow IWYU (Include What You Use) principle.
---
v2: added one more missing header
drivers/leds/leds-expresswire.c | 4 ++++ include/linux/leds-expresswire.h | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-)
drivers/leds/leds-expresswire.c +4 -0
@@ -5,8 +5,12 @@* ktd2692 and ktd2801 are known to use this protocol. */ +#include <linux/bits.h> #include <linux/delay.h> +#include <linux/export.h> #include <linux/gpio/consumer.h> +#include <linux/types.h> +#include <linux/leds-expresswire.h> void expresswire_power_off (struct expresswire_common_props *props)
include/linux/leds-expresswire.h +3 -1
@@ -8,7 +8,9 @@ #ifndef _LEDS_EXPRESSWIRE_H #define _LEDS_EXPRESSWIRE_H -#include <linux/gpio/consumer.h> +#include <linux/types.h> + +struct gpio_desc; struct expresswire_timing { unsigned long poweroff_us;
Signature · 1 line
2.43.0.rc1.1.gbec44491f096
Hi!
Quoted 16 lines
Update header inclusions to follow IWYU (Include What You Use) principle.
Signed-off-by Andy Shevchenko <[email protected]>---
v2: added one more missing headerdrivers/leds/leds-expresswire.c | 4 ++++ include/linux/leds-expresswire.h | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-)include/linux/leds-expresswire.h +0
-0
include/linux/leds-expresswire.h line 13
Quoted 7 lines
include/linux/leds-expresswire.h +3
-1@@ -8,7 +8,9 @@#ifndef _LEDS_EXPRESSWIRE_H#define _LEDS_EXPRESSWIRE_H -#include <linux/gpio/consumer.h> +#include <linux/types.h> + +struct gpio_desc ;
If include tweak means you need to declare struct, is it ian improvement?
BR,
Pavel
Signature · 1 line
People of Russia, stop Putin before his war on Ukraine escalates.
Duje Mihanović
maintainerQuoted 7 lines · Pavel Machek
include/linux/leds-expresswire.h line 13
Quoted 4 lines
include/linux/leds-expresswire.h +3
-1-#include <linux/gpio/consumer.h> +#include <linux/types.h> + +struct gpio_desc ;If include tweak means you need to declare struct, is it ian improvement?
In this case I'd say yes, the header in question has numerous other declarations (which are not used in leds-expresswire.h) and itself declares gpio_desc like this anyway.
Regards,
--
Duje
On Fri, Feb 23, 2024 at 09:56:56PM +0100, Pavel Machek wrote:
...
Quoted 4 lines
Quoted 1 line
+struct
gpio_desc;If include tweak means you need to declare struct, is it ian improvement?
Of course, we increase a build time by dropping the header that's not used for the compilation.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 1 line · Andy Shevchenko
On Fri, Feb 23, 2024 at 09:56:56PM +0100, Pavel Machek wrote:
...
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
+struct
gpio_desc;If include tweak means you need to declare struct, is it ian improvement?
Of course, we increase a build time by dropping the header that's
Should be read: increase --> decrease
Quoted 1 line
not used for the compilation.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 9 lines · Andy Shevchenko
Update header inclusions to follow IWYU (Include What You Use) principle.
Signed-off-by Andy Shevchenko <[email protected]>---
v2: added one more missing headerdrivers/leds/leds-expresswire.c | 4 ++++ include/linux/leds-expresswire.h | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-)
Quoted 5 lines · Duje Mihanović
Quoted 2 lines · Andy Shevchenko
Update header inclusions to follow IWYU (Include What You Use) principle.
Reviewed-by Duje Mihanović <[email protected]>
Thank you!
Signature · 2 lines
With Best Regards, Andy Shevchenko
Re: (subset) [PATCH v2 1/1] leds: expresswire: Don't use "proxy" headers
In reply to Andy ShevchenkoQuoted 4 lines · Andy Shevchenko
Update header inclusions to follow IWYU (Include What You Use) principle.
Applied, thanks!
[1/1] leds: expresswire: Don't use "proxy" headers
commit: 8471d8737e3b4915ba0802985427364cd286ca5b
--
Lee Jones [李琼斯]