public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/1] leds: expresswire: Don't use "proxy" headers
@ 2024-02-23 20:30 Andy Shevchenko
  2024-02-23 20:56 ` Pavel Machek
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Andy Shevchenko @ 2024-02-23 20:30 UTC (permalink / raw)
  To: Duje Mihanović, Andy Shevchenko, linux-leds, linux-kernel
  Cc: Pavel Machek, Lee Jones

Update header inclusions to follow IWYU (Include What You Use)
principle.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
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(-)

diff --git a/drivers/leds/leds-expresswire.c b/drivers/leds/leds-expresswire.c
index 89e147b0e019..e4937a8e0f44 100644
--- a/drivers/leds/leds-expresswire.c
+++ b/drivers/leds/leds-expresswire.c
@@ -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)
diff --git a/include/linux/leds-expresswire.h b/include/linux/leds-expresswire.h
index 3c61902ccac8..a422921f4159 100644
--- a/include/linux/leds-expresswire.h
+++ b/include/linux/leds-expresswire.h
@@ -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;
-- 
2.43.0.rc1.1.gbec44491f096


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 1/1] leds: expresswire: Don't use "proxy" headers
  2024-02-23 20:30 [PATCH v2 1/1] leds: expresswire: Don't use "proxy" headers Andy Shevchenko
@ 2024-02-23 20:56 ` Pavel Machek
  2024-02-24 15:31   ` Duje Mihanović
  2024-02-26 14:27   ` Andy Shevchenko
  2024-02-24 16:02 ` Duje Mihanović
  2024-02-29 17:22 ` (subset) " Lee Jones
  2 siblings, 2 replies; 8+ messages in thread
From: Pavel Machek @ 2024-02-23 20:56 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: Duje Mihanović, linux-leds, linux-kernel, Lee Jones

[-- Attachment #1: Type: text/plain, Size: 919 bytes --]

Hi!

> Update header inclusions to follow IWYU (Include What You Use)
> principle.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> 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(-)
> 

> diff --git a/include/linux/leds-expresswire.h b/include/linux/leds-expresswire.h
> index 3c61902ccac8..a422921f4159 100644
> --- a/include/linux/leds-expresswire.h
> +++ b/include/linux/leds-expresswire.h
> @@ -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
-- 
People of Russia, stop Putin before his war on Ukraine escalates.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 1/1] leds: expresswire: Don't use "proxy" headers
  2024-02-23 20:56 ` Pavel Machek
@ 2024-02-24 15:31   ` Duje Mihanović
  2024-02-26 14:27   ` Andy Shevchenko
  1 sibling, 0 replies; 8+ messages in thread
From: Duje Mihanović @ 2024-02-24 15:31 UTC (permalink / raw)
  To: Pavel Machek, Andy Shevchenko; +Cc: linux-leds, linux-kernel, Lee Jones

On 2/23/2024 9:56 PM, Pavel Machek wrote:
>> -#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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 1/1] leds: expresswire: Don't use "proxy" headers
  2024-02-23 20:30 [PATCH v2 1/1] leds: expresswire: Don't use "proxy" headers Andy Shevchenko
  2024-02-23 20:56 ` Pavel Machek
@ 2024-02-24 16:02 ` Duje Mihanović
  2024-02-26 14:34   ` Andy Shevchenko
  2024-02-29 17:22 ` (subset) " Lee Jones
  2 siblings, 1 reply; 8+ messages in thread
From: Duje Mihanović @ 2024-02-24 16:02 UTC (permalink / raw)
  To: Andy Shevchenko, linux-leds, linux-kernel; +Cc: Pavel Machek, Lee Jones

On 2/23/2024 9:30 PM, Andy Shevchenko wrote:
> Update header inclusions to follow IWYU (Include What You Use)
> principle.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> 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(-)

Reviewed-by: Duje Mihanović <duje.mihanovic@skole.hr>


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 1/1] leds: expresswire: Don't use "proxy" headers
  2024-02-23 20:56 ` Pavel Machek
  2024-02-24 15:31   ` Duje Mihanović
@ 2024-02-26 14:27   ` Andy Shevchenko
  2024-02-26 14:34     ` Andy Shevchenko
  1 sibling, 1 reply; 8+ messages in thread
From: Andy Shevchenko @ 2024-02-26 14:27 UTC (permalink / raw)
  To: Pavel Machek; +Cc: Duje Mihanović, linux-leds, linux-kernel, Lee Jones

On Fri, Feb 23, 2024 at 09:56:56PM +0100, Pavel Machek wrote:

...

> > +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.

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 1/1] leds: expresswire: Don't use "proxy" headers
  2024-02-26 14:27   ` Andy Shevchenko
@ 2024-02-26 14:34     ` Andy Shevchenko
  0 siblings, 0 replies; 8+ messages in thread
From: Andy Shevchenko @ 2024-02-26 14:34 UTC (permalink / raw)
  To: Pavel Machek; +Cc: Duje Mihanović, linux-leds, linux-kernel, Lee Jones

On Mon, Feb 26, 2024 at 04:28:00PM +0200, Andy Shevchenko wrote:
> On Fri, Feb 23, 2024 at 09:56:56PM +0100, Pavel Machek wrote:

...

> > > +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

> not used for the compilation.

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 1/1] leds: expresswire: Don't use "proxy" headers
  2024-02-24 16:02 ` Duje Mihanović
@ 2024-02-26 14:34   ` Andy Shevchenko
  0 siblings, 0 replies; 8+ messages in thread
From: Andy Shevchenko @ 2024-02-26 14:34 UTC (permalink / raw)
  To: Duje Mihanović; +Cc: linux-leds, linux-kernel, Pavel Machek, Lee Jones

On Sat, Feb 24, 2024 at 05:02:40PM +0100, Duje Mihanović wrote:
> On 2/23/2024 9:30 PM, Andy Shevchenko wrote:
> > Update header inclusions to follow IWYU (Include What You Use)
> > principle.

> Reviewed-by: Duje Mihanović <duje.mihanovic@skole.hr>

Thank you!

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: (subset) [PATCH v2 1/1] leds: expresswire: Don't use "proxy" headers
  2024-02-23 20:30 [PATCH v2 1/1] leds: expresswire: Don't use "proxy" headers Andy Shevchenko
  2024-02-23 20:56 ` Pavel Machek
  2024-02-24 16:02 ` Duje Mihanović
@ 2024-02-29 17:22 ` Lee Jones
  2 siblings, 0 replies; 8+ messages in thread
From: Lee Jones @ 2024-02-29 17:22 UTC (permalink / raw)
  To: Duje Mihanović, linux-leds, linux-kernel, Andy Shevchenko
  Cc: Pavel Machek

On Fri, 23 Feb 2024 22:30:00 +0200, Andy Shevchenko wrote:
> 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 [李琼斯]


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-02-29 17:22 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-23 20:30 [PATCH v2 1/1] leds: expresswire: Don't use "proxy" headers Andy Shevchenko
2024-02-23 20:56 ` Pavel Machek
2024-02-24 15:31   ` Duje Mihanović
2024-02-26 14:27   ` Andy Shevchenko
2024-02-26 14:34     ` Andy Shevchenko
2024-02-24 16:02 ` Duje Mihanović
2024-02-26 14:34   ` Andy Shevchenko
2024-02-29 17:22 ` (subset) " Lee Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox