Linux Kernel Mentees list
 help / color / mirror / Atom feed
* [PATCH v4 0/2] iio: adc: spear_adc: sort and clean up headers for IWYU
@ 2026-05-27  1:36 Rodrigo Gobbi
  2026-05-27  1:36 ` [PATCH v4 1/2] iio: adc: spear_adc: sort includes alphabetically Rodrigo Gobbi
  2026-05-27  1:36 ` [PATCH v4 2/2] iio: adc: spear_adc: align headers with IWYU principle Rodrigo Gobbi
  0 siblings, 2 replies; 5+ messages in thread
From: Rodrigo Gobbi @ 2026-05-27  1:36 UTC (permalink / raw)
  To: jic23, dlechner, nuno.sa, andy
  Cc: ~lkcamp/patches, linux-kernel-mentees, linux-iio, linux-kernel

This series is sorting existing includes and then cleaning up unused
headers as well as adding new ones to follow the IWYU principle.
---
Hi, all, 

Creating a series as suggested at v3, no functional change.
Tks and regards.

Changelog:
v4: split into two patches as requested by reviewer
v3: https://lore.kernel.org/all/20260324221313.119473-1-rodrigo.gobbi.7@gmail.com/
v2: https://lore.kernel.org/all/20251206132120.11059-1-rodrigo.gobbi.7@gmail.com/
v1: https://lore.kernel.org/all/20251009182636.187026-1-rodrigo.gobbi.7@gmail.com/

---
Rodrigo Gobbi (2):
  iio: adc: spear_adc: sort includes alphabetically
  iio: adc: spear_adc: Align headers with IWYU principle

 drivers/iio/adc/spear_adc.c | 23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)

-- 
2.48.1


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

* [PATCH v4 1/2] iio: adc: spear_adc: sort includes alphabetically
  2026-05-27  1:36 [PATCH v4 0/2] iio: adc: spear_adc: sort and clean up headers for IWYU Rodrigo Gobbi
@ 2026-05-27  1:36 ` Rodrigo Gobbi
  2026-05-27  1:36 ` [PATCH v4 2/2] iio: adc: spear_adc: align headers with IWYU principle Rodrigo Gobbi
  1 sibling, 0 replies; 5+ messages in thread
From: Rodrigo Gobbi @ 2026-05-27  1:36 UTC (permalink / raw)
  To: jic23, dlechner, nuno.sa, andy
  Cc: ~lkcamp/patches, linux-kernel-mentees, linux-iio, linux-kernel

Sort includes alphabetically, no functional change

Signed-off-by: Rodrigo Gobbi <rodrigo.gobbi.7@gmail.com>
---
 drivers/iio/adc/spear_adc.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/iio/adc/spear_adc.c b/drivers/iio/adc/spear_adc.c
index 91995489bb1c..efde6afc54fd 100644
--- a/drivers/iio/adc/spear_adc.c
+++ b/drivers/iio/adc/spear_adc.c
@@ -5,19 +5,19 @@
  * Copyright 2012 Stefan Roese <sr@denx.de>
  */
 
+#include <linux/bitfield.h>
+#include <linux/clk.h>
+#include <linux/completion.h>
+#include <linux/device.h>
+#include <linux/err.h>
+#include <linux/interrupt.h>
+#include <linux/io.h>
+#include <linux/kernel.h>
 #include <linux/mod_devicetable.h>
 #include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/property.h>
-#include <linux/interrupt.h>
-#include <linux/device.h>
-#include <linux/kernel.h>
 #include <linux/slab.h>
-#include <linux/io.h>
-#include <linux/bitfield.h>
-#include <linux/clk.h>
-#include <linux/err.h>
-#include <linux/completion.h>
 
 #include <linux/iio/iio.h>
 #include <linux/iio/sysfs.h>
-- 
2.48.1


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

* [PATCH v4 2/2] iio: adc: spear_adc: align headers with IWYU principle
  2026-05-27  1:36 [PATCH v4 0/2] iio: adc: spear_adc: sort and clean up headers for IWYU Rodrigo Gobbi
  2026-05-27  1:36 ` [PATCH v4 1/2] iio: adc: spear_adc: sort includes alphabetically Rodrigo Gobbi
@ 2026-05-27  1:36 ` Rodrigo Gobbi
  2026-05-27 10:21   ` Jonathan Cameron
  2026-06-05 18:10   ` Andy Shevchenko
  1 sibling, 2 replies; 5+ messages in thread
From: Rodrigo Gobbi @ 2026-05-27  1:36 UTC (permalink / raw)
  To: jic23, dlechner, nuno.sa, andy
  Cc: ~lkcamp/patches, linux-kernel-mentees, linux-iio, linux-kernel

Remove unused includes and add what is being used:

#include <linux/array_size.h> // for ARRAY_SIZE
#include <linux/bits.h>  // for GENMASKxx
#include <linux/dev_printk.h> // for dev_err_probe, dev_info
#include <linux/math.h>  // for DIV_ROUND_UP
#include <linux/mutex.h> // for struct mutex
#include <linux/types.h> // for uXX definitions
#include <linux/iio/types.h> // for IIO_CHAN_INFO_*

Signed-off-by: Rodrigo Gobbi <rodrigo.gobbi.7@gmail.com>
---
 drivers/iio/adc/spear_adc.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/iio/adc/spear_adc.c b/drivers/iio/adc/spear_adc.c
index efde6afc54fd..4be722406bb5 100644
--- a/drivers/iio/adc/spear_adc.c
+++ b/drivers/iio/adc/spear_adc.c
@@ -5,22 +5,25 @@
  * Copyright 2012 Stefan Roese <sr@denx.de>
  */
 
+#include <linux/array_size.h>
 #include <linux/bitfield.h>
+#include <linux/bits.h>
 #include <linux/clk.h>
 #include <linux/completion.h>
-#include <linux/device.h>
+#include <linux/dev_printk.h>
 #include <linux/err.h>
 #include <linux/interrupt.h>
 #include <linux/io.h>
-#include <linux/kernel.h>
+#include <linux/math.h>
 #include <linux/mod_devicetable.h>
 #include <linux/module.h>
+#include <linux/mutex.h>
 #include <linux/platform_device.h>
 #include <linux/property.h>
-#include <linux/slab.h>
+#include <linux/types.h>
 
 #include <linux/iio/iio.h>
-#include <linux/iio/sysfs.h>
+#include <linux/iio/types.h>
 
 /* SPEAR registers definitions */
 #define SPEAR600_ADC_SCAN_RATE_LO(x)	((x) & 0xFFFF)
-- 
2.48.1


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

* Re: [PATCH v4 2/2] iio: adc: spear_adc: align headers with IWYU principle
  2026-05-27  1:36 ` [PATCH v4 2/2] iio: adc: spear_adc: align headers with IWYU principle Rodrigo Gobbi
@ 2026-05-27 10:21   ` Jonathan Cameron
  2026-06-05 18:10   ` Andy Shevchenko
  1 sibling, 0 replies; 5+ messages in thread
From: Jonathan Cameron @ 2026-05-27 10:21 UTC (permalink / raw)
  To: Rodrigo Gobbi
  Cc: dlechner, nuno.sa, andy, ~lkcamp/patches, linux-kernel-mentees,
	linux-iio, linux-kernel

On Tue, 26 May 2026 22:36:40 -0300
Rodrigo Gobbi <rodrigo.gobbi.7@gmail.com> wrote:

> Remove unused includes and add what is being used:
> 
> #include <linux/array_size.h> // for ARRAY_SIZE
> #include <linux/bits.h>  // for GENMASKxx
> #include <linux/dev_printk.h> // for dev_err_probe, dev_info
> #include <linux/math.h>  // for DIV_ROUND_UP
> #include <linux/mutex.h> // for struct mutex
> #include <linux/types.h> // for uXX definitions
> #include <linux/iio/types.h> // for IIO_CHAN_INFO_*
> 
> Signed-off-by: Rodrigo Gobbi <rodrigo.gobbi.7@gmail.com>
> ---
>  drivers/iio/adc/spear_adc.c | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/iio/adc/spear_adc.c b/drivers/iio/adc/spear_adc.c
> index efde6afc54fd..4be722406bb5 100644
> --- a/drivers/iio/adc/spear_adc.c
> +++ b/drivers/iio/adc/spear_adc.c
> @@ -5,22 +5,25 @@
>   * Copyright 2012 Stefan Roese <sr@denx.de>
>   */
>  
> +#include <linux/array_size.h>
>  #include <linux/bitfield.h>
> +#include <linux/bits.h>
>  #include <linux/clk.h>
>  #include <linux/completion.h>
> -#include <linux/device.h>
> +#include <linux/dev_printk.h>
>  #include <linux/err.h>
>  #include <linux/interrupt.h>
>  #include <linux/io.h>
> -#include <linux/kernel.h>
> +#include <linux/math.h>
>  #include <linux/mod_devicetable.h>
>  #include <linux/module.h>
> +#include <linux/mutex.h>
>  #include <linux/platform_device.h>
>  #include <linux/property.h>
> -#include <linux/slab.h>
> +#include <linux/types.h>
>  
>  #include <linux/iio/iio.h>
> -#include <linux/iio/sysfs.h>
> +#include <linux/iio/types.h>

This one is in my 'maybe' list.  I'm fairly confident that
the main iio.h header will always include it. However that's
not necessarily obvious so I don't much mind including here anyway.

Anyhow, series applied to the testing branch of iio.git

Thanks,

Jonathan



>  
>  /* SPEAR registers definitions */
>  #define SPEAR600_ADC_SCAN_RATE_LO(x)	((x) & 0xFFFF)


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

* Re: [PATCH v4 2/2] iio: adc: spear_adc: align headers with IWYU principle
  2026-05-27  1:36 ` [PATCH v4 2/2] iio: adc: spear_adc: align headers with IWYU principle Rodrigo Gobbi
  2026-05-27 10:21   ` Jonathan Cameron
@ 2026-06-05 18:10   ` Andy Shevchenko
  1 sibling, 0 replies; 5+ messages in thread
From: Andy Shevchenko @ 2026-06-05 18:10 UTC (permalink / raw)
  To: Rodrigo Gobbi
  Cc: jic23, dlechner, nuno.sa, andy, ~lkcamp/patches,
	linux-kernel-mentees, linux-iio, linux-kernel

On Tue, May 26, 2026 at 10:36:40PM -0300, Rodrigo Gobbi wrote:
> Remove unused includes and add what is being used:
> 
> #include <linux/array_size.h> // for ARRAY_SIZE
> #include <linux/bits.h>  // for GENMASKxx
> #include <linux/dev_printk.h> // for dev_err_probe, dev_info
> #include <linux/math.h>  // for DIV_ROUND_UP
> #include <linux/mutex.h> // for struct mutex
> #include <linux/types.h> // for uXX definitions

> #include <linux/iio/types.h> // for IIO_CHAN_INFO_*

I guess we tend to avoid including this one as long as iio/iio.h is included.

-- 
With Best Regards,
Andy Shevchenko



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

end of thread, other threads:[~2026-06-05 18:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-27  1:36 [PATCH v4 0/2] iio: adc: spear_adc: sort and clean up headers for IWYU Rodrigo Gobbi
2026-05-27  1:36 ` [PATCH v4 1/2] iio: adc: spear_adc: sort includes alphabetically Rodrigo Gobbi
2026-05-27  1:36 ` [PATCH v4 2/2] iio: adc: spear_adc: align headers with IWYU principle Rodrigo Gobbi
2026-05-27 10:21   ` Jonathan Cameron
2026-06-05 18:10   ` Andy Shevchenko

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