* [PATCH v2 1/2] iio: light: stk3310: Sort headers alphabetically
@ 2026-04-28 16:13 Rafael G. Dias
2026-04-28 16:13 ` [PATCH v2 2/2] iio: light: stk3310: Update includes to match IWYU Rafael G. Dias
2026-04-28 16:37 ` [PATCH v2 1/2] iio: light: stk3310: Sort headers alphabetically Joshua Crofts
0 siblings, 2 replies; 10+ messages in thread
From: Rafael G. Dias @ 2026-04-28 16:13 UTC (permalink / raw)
To: jic23, dlechner, nuno.sa, andy
Cc: linux-iio, joshua.crofts1, Rafael G. Dias, Felipe Khoury Dayoub
Sort the included headers alphabetically and group the <linux/iio/*>
headers separately from the generic <linux/*> headers.
Co-developed-by: Felipe Khoury Dayoub <felipedayoub@usp.br>
Signed-off-by: Felipe Khoury Dayoub <felipedayoub@usp.br>
Signed-off-by: Rafael G. Dias <rafael.guimaraes.dias@usp.br>
---
drivers/iio/light/stk3310.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/iio/light/stk3310.c b/drivers/iio/light/stk3310.c
index a75a83594a7e..1fad9367c2d4 100644
--- a/drivers/iio/light/stk3310.c
+++ b/drivers/iio/light/stk3310.c
@@ -10,9 +10,10 @@
#include <linux/i2c.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
-#include <linux/module.h>
#include <linux/mod_devicetable.h>
+#include <linux/module.h>
#include <linux/regmap.h>
+
#include <linux/iio/events.h>
#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>
--
2.43.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v2 2/2] iio: light: stk3310: Update includes to match IWYU
2026-04-28 16:13 [PATCH v2 1/2] iio: light: stk3310: Sort headers alphabetically Rafael G. Dias
@ 2026-04-28 16:13 ` Rafael G. Dias
2026-04-28 16:49 ` Joshua Crofts
2026-04-29 19:49 ` Andy Shevchenko
2026-04-28 16:37 ` [PATCH v2 1/2] iio: light: stk3310: Sort headers alphabetically Joshua Crofts
1 sibling, 2 replies; 10+ messages in thread
From: Rafael G. Dias @ 2026-04-28 16:13 UTC (permalink / raw)
To: jic23, dlechner, nuno.sa, andy
Cc: linux-iio, joshua.crofts1, Rafael G. Dias, Felipe Khoury Dayoub
Clean up the included headers in stk3310.c according to the
Include-What-You-Use (IWYU) tool. Remove the generic <linux/kernel.h>
header and add explicit dependencies to improve compilation accuracy.
Co-developed-by: Felipe Khoury Dayoub <felipedayoub@usp.br>
Signed-off-by: Felipe Khoury Dayoub <felipedayoub@usp.br>
Signed-off-by: Rafael G. Dias <rafael.guimaraes.dias@usp.br>
---
drivers/iio/light/stk3310.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/drivers/iio/light/stk3310.c b/drivers/iio/light/stk3310.c
index 1fad9367c2d4..37b7b9367269 100644
--- a/drivers/iio/light/stk3310.c
+++ b/drivers/iio/light/stk3310.c
@@ -7,16 +7,27 @@
* IIO driver for STK3310/STK3311. 7-bit I2C address: 0x48.
*/
+#include <linux/array_size.h>
+#include <linux/bits.h>
+#include <linux/dev_printk.h>
+#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/i2c.h>
#include <linux/interrupt.h>
-#include <linux/kernel.h>
+#include <linux/irqreturn.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
+#include <linux/mutex.h>
+#include <linux/pm.h>
+#include <linux/property.h>
#include <linux/regmap.h>
+#include <linux/sprintf.h>
+#include <linux/types.h>
#include <linux/iio/events.h>
#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>
+#include <linux/iio/types.h>
#define STK3310_REG_STATE 0x00
#define STK3310_REG_PSCTRL 0x01
--
2.43.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v2 1/2] iio: light: stk3310: Sort headers alphabetically
2026-04-28 16:13 [PATCH v2 1/2] iio: light: stk3310: Sort headers alphabetically Rafael G. Dias
2026-04-28 16:13 ` [PATCH v2 2/2] iio: light: stk3310: Update includes to match IWYU Rafael G. Dias
@ 2026-04-28 16:37 ` Joshua Crofts
1 sibling, 0 replies; 10+ messages in thread
From: Joshua Crofts @ 2026-04-28 16:37 UTC (permalink / raw)
To: Rafael G. Dias
Cc: jic23, dlechner, nuno.sa, andy, linux-iio, Felipe Khoury Dayoub
On Tue, 28 Apr 2026 at 18:13, Rafael G. Dias
<rafael.guimaraes.dias@usp.br> wrote:
>
> Sort the included headers alphabetically and group the <linux/iio/*>
> headers separately from the generic <linux/*> headers.
>
> Co-developed-by: Felipe Khoury Dayoub <felipedayoub@usp.br>
> Signed-off-by: Felipe Khoury Dayoub <felipedayoub@usp.br>
> Signed-off-by: Rafael G. Dias <rafael.guimaraes.dias@usp.br>
> ---
> drivers/iio/light/stk3310.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/iio/light/stk3310.c b/drivers/iio/light/stk3310.c
> index a75a83594a7e..1fad9367c2d4 100644
> --- a/drivers/iio/light/stk3310.c
> +++ b/drivers/iio/light/stk3310.c
> @@ -10,9 +10,10 @@
> #include <linux/i2c.h>
> #include <linux/interrupt.h>
> #include <linux/kernel.h>
> -#include <linux/module.h>
> #include <linux/mod_devicetable.h>
> +#include <linux/module.h>
> #include <linux/regmap.h>
> +
> #include <linux/iio/events.h>
> #include <linux/iio/iio.h>
> #include <linux/iio/sysfs.h>
> --
> 2.43.0
>
Try not to send follow-up patches at least 24 hours,
let them sit so others can look over them.
Otherwise LGTM.
Reviewed-by: Joshua Crofts <joshua.crofts1@gmail.com>
--
Kind regards
CJD
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 2/2] iio: light: stk3310: Update includes to match IWYU
2026-04-28 16:13 ` [PATCH v2 2/2] iio: light: stk3310: Update includes to match IWYU Rafael G. Dias
@ 2026-04-28 16:49 ` Joshua Crofts
2026-04-29 10:23 ` Jonathan Cameron
2026-04-29 19:49 ` Andy Shevchenko
1 sibling, 1 reply; 10+ messages in thread
From: Joshua Crofts @ 2026-04-28 16:49 UTC (permalink / raw)
To: Rafael G. Dias
Cc: jic23, dlechner, nuno.sa, andy, linux-iio, Felipe Khoury Dayoub
On Tue, 28 Apr 2026 at 18:14, Rafael G. Dias
<rafael.guimaraes.dias@usp.br> wrote:
>
> Clean up the included headers in stk3310.c according to the
> Include-What-You-Use (IWYU) tool. Remove the generic <linux/kernel.h>
> header and add explicit dependencies to improve compilation accuracy.
>
> Co-developed-by: Felipe Khoury Dayoub <felipedayoub@usp.br>
> Signed-off-by: Felipe Khoury Dayoub <felipedayoub@usp.br>
> Signed-off-by: Rafael G. Dias <rafael.guimaraes.dias@usp.br>
> ---
> drivers/iio/light/stk3310.c | 13 ++++++++++++-
> 1 file changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/iio/light/stk3310.c b/drivers/iio/light/stk3310.c
> index 1fad9367c2d4..37b7b9367269 100644
> --- a/drivers/iio/light/stk3310.c
> +++ b/drivers/iio/light/stk3310.c
> @@ -7,16 +7,27 @@
> * IIO driver for STK3310/STK3311. 7-bit I2C address: 0x48.
> */
>
> +#include <linux/array_size.h>
> +#include <linux/bits.h>
> +#include <linux/dev_printk.h>
> +#include <linux/err.h>
> +#include <linux/errno.h>
> #include <linux/i2c.h>
> #include <linux/interrupt.h>
> -#include <linux/kernel.h>
> +#include <linux/irqreturn.h>
> #include <linux/mod_devicetable.h>
> #include <linux/module.h>
> +#include <linux/mutex.h>
> +#include <linux/pm.h>
> +#include <linux/property.h>
> #include <linux/regmap.h>
> +#include <linux/sprintf.h>
> +#include <linux/types.h>
>
> #include <linux/iio/events.h>
> #include <linux/iio/iio.h>
> #include <linux/iio/sysfs.h>
> +#include <linux/iio/types.h>
>
> #define STK3310_REG_STATE 0x00
> #define STK3310_REG_PSCTRL 0x01
> --
> 2.43.0
>
Reviewed-by: Joshua Crofts <joshua.crofts1@gmail.com>
--
Kind regards
CJD
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 2/2] iio: light: stk3310: Update includes to match IWYU
2026-04-28 16:49 ` Joshua Crofts
@ 2026-04-29 10:23 ` Jonathan Cameron
[not found] ` <CAPBn40g+PPyxnVfLn8q2bGgtQ=Zy1VBQW3qQeje=v9sTSx0N5Q@mail.gmail.com>
2026-04-29 19:51 ` Andy Shevchenko
0 siblings, 2 replies; 10+ messages in thread
From: Jonathan Cameron @ 2026-04-29 10:23 UTC (permalink / raw)
To: Joshua Crofts
Cc: Rafael G. Dias, dlechner, nuno.sa, andy, linux-iio,
Felipe Khoury Dayoub
On Tue, 28 Apr 2026 18:49:36 +0200
Joshua Crofts <joshua.crofts1@gmail.com> wrote:
> On Tue, 28 Apr 2026 at 18:14, Rafael G. Dias
> <rafael.guimaraes.dias@usp.br> wrote:
> >
> > Clean up the included headers in stk3310.c according to the
> > Include-What-You-Use (IWYU) tool. Remove the generic <linux/kernel.h>
> > header and add explicit dependencies to improve compilation accuracy.
> >
> > Co-developed-by: Felipe Khoury Dayoub <felipedayoub@usp.br>
> > Signed-off-by: Felipe Khoury Dayoub <felipedayoub@usp.br>
> > Signed-off-by: Rafael G. Dias <rafael.guimaraes.dias@usp.br>
https://sashiko.dev/#/patchset/20260428161339.1187956-1-rafael.guimaraes.dias%40usp.br
Had a few comments. I added asm/byteorder.h and linux/sysfs.h.
Maybe we could argue the sysfs.h one will always be included by
iio/sysfs.h but I think it's better to explicitly include it
for struct attribute_group and similar.
The asm/byteorder.h is simpler one as that should definitely be here.
Anyhow, tweaked whilst applying and applied to the testing branch of
iio.git.
However, do slow down a bit as Joshua suggested - I'd generally
suggest a week between first version and second, but I am a bit
more relaxed on this for students and new submitters doing fairly
simple patches.
Thanks,
Jonathan
> > ---
> > drivers/iio/light/stk3310.c | 13 ++++++++++++-
> > 1 file changed, 12 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/iio/light/stk3310.c b/drivers/iio/light/stk3310.c
> > index 1fad9367c2d4..37b7b9367269 100644
> > --- a/drivers/iio/light/stk3310.c
> > +++ b/drivers/iio/light/stk3310.c
> > @@ -7,16 +7,27 @@
> > * IIO driver for STK3310/STK3311. 7-bit I2C address: 0x48.
> > */
> >
> > +#include <linux/array_size.h>
> > +#include <linux/bits.h>
> > +#include <linux/dev_printk.h>
> > +#include <linux/err.h>
> > +#include <linux/errno.h>
> > #include <linux/i2c.h>
> > #include <linux/interrupt.h>
> > -#include <linux/kernel.h>
> > +#include <linux/irqreturn.h>
> > #include <linux/mod_devicetable.h>
> > #include <linux/module.h>
> > +#include <linux/mutex.h>
> > +#include <linux/pm.h>
> > +#include <linux/property.h>
> > #include <linux/regmap.h>
> > +#include <linux/sprintf.h>
> > +#include <linux/types.h>
> >
> > #include <linux/iio/events.h>
> > #include <linux/iio/iio.h>
> > #include <linux/iio/sysfs.h>
> > +#include <linux/iio/types.h>
> >
> > #define STK3310_REG_STATE 0x00
> > #define STK3310_REG_PSCTRL 0x01
> > --
> > 2.43.0
> >
>
> Reviewed-by: Joshua Crofts <joshua.crofts1@gmail.com>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 2/2] iio: light: stk3310: Update includes to match IWYU
[not found] ` <CAPBn40g+PPyxnVfLn8q2bGgtQ=Zy1VBQW3qQeje=v9sTSx0N5Q@mail.gmail.com>
@ 2026-04-29 19:18 ` Rafael Guimaraes Dias
0 siblings, 0 replies; 10+ messages in thread
From: Rafael Guimaraes Dias @ 2026-04-29 19:18 UTC (permalink / raw)
To: Jonathan Cameron
Cc: Joshua Crofts, dlechner, nuno.sa, andy, linux-iio,
Felipe Khoury Dayoub
(Resending as plain text for the mailing list. Apologies for the
duplicate to those who already received it).
Hi Jonathan and Joshua,
Thank you very much for the guidance and for the time you took to
review this patchset.
Thank you, Jonathan, for making the final tweaks with asm/byteorder.h
and linux/sysfs.h before applying it. I completely understand your
point regarding the explicit inclusion for attribute_group.
I also appreciate the advice about slowing down between versions. I
will definitely keep that in mind and wait longer before sending out
updated versions in my future contributions.
Best regards, Rafael G. Dias
Em qua., 29 de abr. de 2026 às 15:55, Rafael Guimaraes Dias
<rafael.guimaraes.dias@usp.br> escreveu:
>
> Hi Jonathan and Joshua,
>
> Thank you very much for the guidance and for the time you took to review this patchset.
>
> Thank you, Jonathan, for making the final tweaks with asm/byteorder.h and linux/sysfs.h before applying it. I completely understand your point regarding the explicit inclusion for attribute_group.
>
> I also appreciate the advice about slowing down between versions. I will definitely keep that in mind and wait longer before sending out updated versions in my future contributions.
>
> Best regards, Rafael G. Dias
>
>
> Em qua., 29 de abr. de 2026 às 07:23, Jonathan Cameron <jic23@kernel.org> escreveu:
>>
>> On Tue, 28 Apr 2026 18:49:36 +0200
>> Joshua Crofts <joshua.crofts1@gmail.com> wrote:
>>
>> > On Tue, 28 Apr 2026 at 18:14, Rafael G. Dias
>> > <rafael.guimaraes.dias@usp.br> wrote:
>> > >
>> > > Clean up the included headers in stk3310.c according to the
>> > > Include-What-You-Use (IWYU) tool. Remove the generic <linux/kernel.h>
>> > > header and add explicit dependencies to improve compilation accuracy.
>> > >
>> > > Co-developed-by: Felipe Khoury Dayoub <felipedayoub@usp.br>
>> > > Signed-off-by: Felipe Khoury Dayoub <felipedayoub@usp.br>
>> > > Signed-off-by: Rafael G. Dias <rafael.guimaraes.dias@usp.br>
>> https://sashiko.dev/#/patchset/20260428161339.1187956-1-rafael.guimaraes.dias%40usp.br
>> Had a few comments. I added asm/byteorder.h and linux/sysfs.h.
>>
>> Maybe we could argue the sysfs.h one will always be included by
>> iio/sysfs.h but I think it's better to explicitly include it
>> for struct attribute_group and similar.
>>
>> The asm/byteorder.h is simpler one as that should definitely be here.
>>
>> Anyhow, tweaked whilst applying and applied to the testing branch of
>> iio.git.
>>
>> However, do slow down a bit as Joshua suggested - I'd generally
>> suggest a week between first version and second, but I am a bit
>> more relaxed on this for students and new submitters doing fairly
>> simple patches.
>>
>> Thanks,
>>
>> Jonathan
>>
>> > > ---
>> > > drivers/iio/light/stk3310.c | 13 ++++++++++++-
>> > > 1 file changed, 12 insertions(+), 1 deletion(-)
>> > >
>> > > diff --git a/drivers/iio/light/stk3310.c b/drivers/iio/light/stk3310.c
>> > > index 1fad9367c2d4..37b7b9367269 100644
>> > > --- a/drivers/iio/light/stk3310.c
>> > > +++ b/drivers/iio/light/stk3310.c
>> > > @@ -7,16 +7,27 @@
>> > > * IIO driver for STK3310/STK3311. 7-bit I2C address: 0x48.
>> > > */
>> > >
>> > > +#include <linux/array_size.h>
>> > > +#include <linux/bits.h>
>> > > +#include <linux/dev_printk.h>
>> > > +#include <linux/err.h>
>> > > +#include <linux/errno.h>
>> > > #include <linux/i2c.h>
>> > > #include <linux/interrupt.h>
>> > > -#include <linux/kernel.h>
>> > > +#include <linux/irqreturn.h>
>> > > #include <linux/mod_devicetable.h>
>> > > #include <linux/module.h>
>> > > +#include <linux/mutex.h>
>> > > +#include <linux/pm.h>
>> > > +#include <linux/property.h>
>> > > #include <linux/regmap.h>
>> > > +#include <linux/sprintf.h>
>> > > +#include <linux/types.h>
>> > >
>> > > #include <linux/iio/events.h>
>> > > #include <linux/iio/iio.h>
>> > > #include <linux/iio/sysfs.h>
>> > > +#include <linux/iio/types.h>
>> > >
>> > > #define STK3310_REG_STATE 0x00
>> > > #define STK3310_REG_PSCTRL 0x01
>> > > --
>> > > 2.43.0
>> > >
>> >
>> > Reviewed-by: Joshua Crofts <joshua.crofts1@gmail.com>
>> >
>>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 2/2] iio: light: stk3310: Update includes to match IWYU
2026-04-28 16:13 ` [PATCH v2 2/2] iio: light: stk3310: Update includes to match IWYU Rafael G. Dias
2026-04-28 16:49 ` Joshua Crofts
@ 2026-04-29 19:49 ` Andy Shevchenko
2026-05-04 15:28 ` Jonathan Cameron
1 sibling, 1 reply; 10+ messages in thread
From: Andy Shevchenko @ 2026-04-29 19:49 UTC (permalink / raw)
To: Rafael G. Dias
Cc: jic23, dlechner, nuno.sa, andy, linux-iio, joshua.crofts1,
Felipe Khoury Dayoub
On Tue, Apr 28, 2026 at 01:13:39PM -0300, Rafael G. Dias wrote:
> Clean up the included headers in stk3310.c according to the
> Include-What-You-Use (IWYU) tool. Remove the generic <linux/kernel.h>
> header and add explicit dependencies to improve compilation accuracy.
...
> +#include <linux/dev_printk.h>
> +#include <linux/err.h>
> +#include <linux/errno.h>
In most cases we assume errno (but strictly speaking it's asm/errno) is
included by err.h. Double check if there are no codes >= 512 are in use in the
driver. If no, drop errno.h.
> #include <linux/i2c.h>
> #include <linux/interrupt.h>
> -#include <linux/kernel.h>
> +#include <linux/irqreturn.h>
Implied by interrupt.h.
> #include <linux/mod_devicetable.h>
> #include <linux/module.h>
> +#include <linux/mutex.h>
> +#include <linux/pm.h>
> +#include <linux/property.h>
> #include <linux/regmap.h>
> +#include <linux/sprintf.h>
> +#include <linux/types.h>
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 2/2] iio: light: stk3310: Update includes to match IWYU
2026-04-29 10:23 ` Jonathan Cameron
[not found] ` <CAPBn40g+PPyxnVfLn8q2bGgtQ=Zy1VBQW3qQeje=v9sTSx0N5Q@mail.gmail.com>
@ 2026-04-29 19:51 ` Andy Shevchenko
2026-05-04 15:26 ` Jonathan Cameron
1 sibling, 1 reply; 10+ messages in thread
From: Andy Shevchenko @ 2026-04-29 19:51 UTC (permalink / raw)
To: Jonathan Cameron
Cc: Joshua Crofts, Rafael G. Dias, dlechner, nuno.sa, andy, linux-iio,
Felipe Khoury Dayoub
On Wed, Apr 29, 2026 at 11:23:00AM +0100, Jonathan Cameron wrote:
> On Tue, 28 Apr 2026 18:49:36 +0200
> Joshua Crofts <joshua.crofts1@gmail.com> wrote:
> > On Tue, 28 Apr 2026 at 18:14, Rafael G. Dias
> > <rafael.guimaraes.dias@usp.br> wrote:
> > >
> > > Clean up the included headers in stk3310.c according to the
> > > Include-What-You-Use (IWYU) tool. Remove the generic <linux/kernel.h>
> > > header and add explicit dependencies to improve compilation accuracy.
> > >
> > > Co-developed-by: Felipe Khoury Dayoub <felipedayoub@usp.br>
> > > Signed-off-by: Felipe Khoury Dayoub <felipedayoub@usp.br>
> > > Signed-off-by: Rafael G. Dias <rafael.guimaraes.dias@usp.br>
> https://sashiko.dev/#/patchset/20260428161339.1187956-1-rafael.guimaraes.dias%40usp.br
> Had a few comments. I added asm/byteorder.h and linux/sysfs.h.
>
> Maybe we could argue the sysfs.h one will always be included by
> iio/sysfs.h but I think it's better to explicitly include it
> for struct attribute_group and similar.
>
> The asm/byteorder.h is simpler one as that should definitely be here.
>
> Anyhow, tweaked whilst applying and applied to the testing branch of
> iio.git.
Please, also drop irqreturn.h as implied by interrupt.h.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 2/2] iio: light: stk3310: Update includes to match IWYU
2026-04-29 19:51 ` Andy Shevchenko
@ 2026-05-04 15:26 ` Jonathan Cameron
0 siblings, 0 replies; 10+ messages in thread
From: Jonathan Cameron @ 2026-05-04 15:26 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Joshua Crofts, Rafael G. Dias, dlechner, nuno.sa, andy, linux-iio,
Felipe Khoury Dayoub
On Wed, 29 Apr 2026 22:51:43 +0300
Andy Shevchenko <andriy.shevchenko@intel.com> wrote:
> On Wed, Apr 29, 2026 at 11:23:00AM +0100, Jonathan Cameron wrote:
> > On Tue, 28 Apr 2026 18:49:36 +0200
> > Joshua Crofts <joshua.crofts1@gmail.com> wrote:
> > > On Tue, 28 Apr 2026 at 18:14, Rafael G. Dias
> > > <rafael.guimaraes.dias@usp.br> wrote:
> > > >
> > > > Clean up the included headers in stk3310.c according to the
> > > > Include-What-You-Use (IWYU) tool. Remove the generic <linux/kernel.h>
> > > > header and add explicit dependencies to improve compilation accuracy.
> > > >
> > > > Co-developed-by: Felipe Khoury Dayoub <felipedayoub@usp.br>
> > > > Signed-off-by: Felipe Khoury Dayoub <felipedayoub@usp.br>
> > > > Signed-off-by: Rafael G. Dias <rafael.guimaraes.dias@usp.br>
> > https://sashiko.dev/#/patchset/20260428161339.1187956-1-rafael.guimaraes.dias%40usp.br
> > Had a few comments. I added asm/byteorder.h and linux/sysfs.h.
> >
> > Maybe we could argue the sysfs.h one will always be included by
> > iio/sysfs.h but I think it's better to explicitly include it
> > for struct attribute_group and similar.
> >
> > The asm/byteorder.h is simpler one as that should definitely be here.
> >
> > Anyhow, tweaked whilst applying and applied to the testing branch of
> > iio.git.
>
> Please, also drop irqreturn.h as implied by interrupt.h.
>
Done.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 2/2] iio: light: stk3310: Update includes to match IWYU
2026-04-29 19:49 ` Andy Shevchenko
@ 2026-05-04 15:28 ` Jonathan Cameron
0 siblings, 0 replies; 10+ messages in thread
From: Jonathan Cameron @ 2026-05-04 15:28 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Rafael G. Dias, dlechner, nuno.sa, andy, linux-iio,
joshua.crofts1, Felipe Khoury Dayoub
On Wed, 29 Apr 2026 22:49:52 +0300
Andy Shevchenko <andriy.shevchenko@intel.com> wrote:
> On Tue, Apr 28, 2026 at 01:13:39PM -0300, Rafael G. Dias wrote:
> > Clean up the included headers in stk3310.c according to the
> > Include-What-You-Use (IWYU) tool. Remove the generic <linux/kernel.h>
> > header and add explicit dependencies to improve compilation accuracy.
>
> ...
>
> > +#include <linux/dev_printk.h>
> > +#include <linux/err.h>
> > +#include <linux/errno.h>
>
> In most cases we assume errno (but strictly speaking it's asm/errno) is
> included by err.h. Double check if there are no codes >= 512 are in use in the
> driver. If no, drop errno.h.
>
I dropped that as well as it's all simple -EINVAL/ -ENOMEM
> > #include <linux/i2c.h>
> > #include <linux/interrupt.h>
> > -#include <linux/kernel.h>
>
> > +#include <linux/irqreturn.h>
>
> Implied by interrupt.h.
>
> > #include <linux/mod_devicetable.h>
> > #include <linux/module.h>
> > +#include <linux/mutex.h>
> > +#include <linux/pm.h>
> > +#include <linux/property.h>
> > #include <linux/regmap.h>
> > +#include <linux/sprintf.h>
> > +#include <linux/types.h>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2026-05-04 15:28 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-28 16:13 [PATCH v2 1/2] iio: light: stk3310: Sort headers alphabetically Rafael G. Dias
2026-04-28 16:13 ` [PATCH v2 2/2] iio: light: stk3310: Update includes to match IWYU Rafael G. Dias
2026-04-28 16:49 ` Joshua Crofts
2026-04-29 10:23 ` Jonathan Cameron
[not found] ` <CAPBn40g+PPyxnVfLn8q2bGgtQ=Zy1VBQW3qQeje=v9sTSx0N5Q@mail.gmail.com>
2026-04-29 19:18 ` Rafael Guimaraes Dias
2026-04-29 19:51 ` Andy Shevchenko
2026-05-04 15:26 ` Jonathan Cameron
2026-04-29 19:49 ` Andy Shevchenko
2026-05-04 15:28 ` Jonathan Cameron
2026-04-28 16:37 ` [PATCH v2 1/2] iio: light: stk3310: Sort headers alphabetically Joshua Crofts
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox