* [PATCH v1 1/1] gpio: generic: Don't use 'proxy' headers
@ 2026-02-26 9:20 Andy Shevchenko
2026-02-26 9:24 ` Bartosz Golaszewski
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Andy Shevchenko @ 2026-02-26 9:20 UTC (permalink / raw)
To: Bartosz Golaszewski, linux-gpio, linux-kernel
Cc: Linus Walleij, Andy Shevchenko
Update header inclusions to follow IWYU (Include What You Use)
principle.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/gpio/gpio-mmio.c | 4 +---
include/linux/gpio/generic.h | 8 +++++++-
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/gpio/gpio-mmio.c b/drivers/gpio/gpio-mmio.c
index edbcaad57d00..0941d034a49c 100644
--- a/drivers/gpio/gpio-mmio.c
+++ b/drivers/gpio/gpio-mmio.c
@@ -42,18 +42,16 @@ o ` ~~~~\___/~~~~ ` controller in FPGA is ,.`
#include <linux/bitops.h>
#include <linux/cleanup.h>
-#include <linux/compiler.h>
#include <linux/err.h>
-#include <linux/init.h>
#include <linux/io.h>
#include <linux/ioport.h>
+#include <linux/limits.h>
#include <linux/log2.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/pinctrl/consumer.h>
#include <linux/platform_device.h>
#include <linux/property.h>
-#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/types.h>
diff --git a/include/linux/gpio/generic.h b/include/linux/gpio/generic.h
index ff566dc9c3cb..de43c06c83ef 100644
--- a/include/linux/gpio/generic.h
+++ b/include/linux/gpio/generic.h
@@ -3,9 +3,15 @@
#ifndef __LINUX_GPIO_GENERIC_H
#define __LINUX_GPIO_GENERIC_H
+#include <linux/bits.h>
+#include <linux/bug.h>
#include <linux/cleanup.h>
-#include <linux/gpio/driver.h>
+#include <linux/container_of.h>
+#include <linux/errno.h>
#include <linux/spinlock.h>
+#include <linux/types.h>
+
+#include <linux/gpio/driver.h>
struct device;
--
2.50.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v1 1/1] gpio: generic: Don't use 'proxy' headers
2026-02-26 9:20 [PATCH v1 1/1] gpio: generic: Don't use 'proxy' headers Andy Shevchenko
@ 2026-02-26 9:24 ` Bartosz Golaszewski
2026-02-26 9:31 ` Andy Shevchenko
2026-02-26 22:01 ` Linus Walleij
2026-02-27 8:58 ` Bartosz Golaszewski
2 siblings, 1 reply; 5+ messages in thread
From: Bartosz Golaszewski @ 2026-02-26 9:24 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: linux-gpio, linux-kernel, Linus Walleij
On Thu, Feb 26, 2026 at 10:20 AM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> Update header inclusions to follow IWYU (Include What You Use)
> principle.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> drivers/gpio/gpio-mmio.c | 4 +---
> include/linux/gpio/generic.h | 8 +++++++-
> 2 files changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpio/gpio-mmio.c b/drivers/gpio/gpio-mmio.c
> index edbcaad57d00..0941d034a49c 100644
> --- a/drivers/gpio/gpio-mmio.c
> +++ b/drivers/gpio/gpio-mmio.c
> @@ -42,18 +42,16 @@ o ` ~~~~\___/~~~~ ` controller in FPGA is ,.`
>
> #include <linux/bitops.h>
> #include <linux/cleanup.h>
> -#include <linux/compiler.h>
> #include <linux/err.h>
> -#include <linux/init.h>
> #include <linux/io.h>
> #include <linux/ioport.h>
> +#include <linux/limits.h>
> #include <linux/log2.h>
> #include <linux/mod_devicetable.h>
> #include <linux/module.h>
> #include <linux/pinctrl/consumer.h>
> #include <linux/platform_device.h>
> #include <linux/property.h>
> -#include <linux/slab.h>
In that case don't we need device.h for devm_kzalloc()?
Bart
> #include <linux/spinlock.h>
> #include <linux/types.h>
>
> diff --git a/include/linux/gpio/generic.h b/include/linux/gpio/generic.h
> index ff566dc9c3cb..de43c06c83ef 100644
> --- a/include/linux/gpio/generic.h
> +++ b/include/linux/gpio/generic.h
> @@ -3,9 +3,15 @@
> #ifndef __LINUX_GPIO_GENERIC_H
> #define __LINUX_GPIO_GENERIC_H
>
> +#include <linux/bits.h>
> +#include <linux/bug.h>
> #include <linux/cleanup.h>
> -#include <linux/gpio/driver.h>
> +#include <linux/container_of.h>
> +#include <linux/errno.h>
> #include <linux/spinlock.h>
> +#include <linux/types.h>
> +
> +#include <linux/gpio/driver.h>
>
> struct device;
>
> --
> 2.50.1
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1 1/1] gpio: generic: Don't use 'proxy' headers
2026-02-26 9:24 ` Bartosz Golaszewski
@ 2026-02-26 9:31 ` Andy Shevchenko
0 siblings, 0 replies; 5+ messages in thread
From: Andy Shevchenko @ 2026-02-26 9:31 UTC (permalink / raw)
To: Bartosz Golaszewski; +Cc: linux-gpio, linux-kernel, Linus Walleij
On Thu, Feb 26, 2026 at 10:24:59AM +0100, Bartosz Golaszewski wrote:
> On Thu, Feb 26, 2026 at 10:20 AM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
...
> > #include <linux/bitops.h>
> > #include <linux/cleanup.h>
> > -#include <linux/compiler.h>
> > #include <linux/err.h>
> > -#include <linux/init.h>
> > #include <linux/io.h>
> > #include <linux/ioport.h>
> > +#include <linux/limits.h>
> > #include <linux/log2.h>
> > #include <linux/mod_devicetable.h>
> > #include <linux/module.h>
> > #include <linux/pinctrl/consumer.h>
> > #include <linux/platform_device.h>
> > #include <linux/property.h>
> > -#include <linux/slab.h>
>
> In that case don't we need device.h for devm_kzalloc()?
(It is device/devres.h, but read below)
It comes thru platform_device.h. And if you follow my attempts to split
device.h, the state of affairs will look like not much will happen there,
so the platform_device.h <- device.h <- devres/device.h is guaranteed.
TL;DR: if we have platform_device.h, it covers everything that device.h
provides.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1 1/1] gpio: generic: Don't use 'proxy' headers
2026-02-26 9:20 [PATCH v1 1/1] gpio: generic: Don't use 'proxy' headers Andy Shevchenko
2026-02-26 9:24 ` Bartosz Golaszewski
@ 2026-02-26 22:01 ` Linus Walleij
2026-02-27 8:58 ` Bartosz Golaszewski
2 siblings, 0 replies; 5+ messages in thread
From: Linus Walleij @ 2026-02-26 22:01 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: Bartosz Golaszewski, linux-gpio, linux-kernel
On Thu, Feb 26, 2026 at 10:20 AM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
> Update header inclusions to follow IWYU (Include What You Use)
> principle.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Looks good to me!
Reviewed-by: Linus Walleij <linusw@kernel.org>
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1 1/1] gpio: generic: Don't use 'proxy' headers
2026-02-26 9:20 [PATCH v1 1/1] gpio: generic: Don't use 'proxy' headers Andy Shevchenko
2026-02-26 9:24 ` Bartosz Golaszewski
2026-02-26 22:01 ` Linus Walleij
@ 2026-02-27 8:58 ` Bartosz Golaszewski
2 siblings, 0 replies; 5+ messages in thread
From: Bartosz Golaszewski @ 2026-02-27 8:58 UTC (permalink / raw)
To: Bartosz Golaszewski, linux-gpio, linux-kernel, Andy Shevchenko
Cc: Bartosz Golaszewski, Linus Walleij
On Thu, 26 Feb 2026 10:20:23 +0100, Andy Shevchenko wrote:
> Update header inclusions to follow IWYU (Include What You Use)
> principle.
>
>
Applied, thanks!
[1/1] gpio: generic: Don't use 'proxy' headers
https://git.kernel.org/brgl/c/b2d51bc1601c762c63f19c119589a0a0c44bc8ec
Best regards,
--
Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-02-27 8:59 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-26 9:20 [PATCH v1 1/1] gpio: generic: Don't use 'proxy' headers Andy Shevchenko
2026-02-26 9:24 ` Bartosz Golaszewski
2026-02-26 9:31 ` Andy Shevchenko
2026-02-26 22:01 ` Linus Walleij
2026-02-27 8:58 ` Bartosz Golaszewski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox