* [PATCH v4 0/2] staging: iio: addac: adt7316: clean up header inclusions
@ 2026-11-04 18:34 Abdelnasser Hussein
2026-11-04 18:34 ` [PATCH v4 1/2] staging: iio: addac: adt7316: sort headers alphabetically Abdelnasser Hussein
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Abdelnasser Hussein @ 2026-11-04 18:34 UTC (permalink / raw)
To: Jonathan Cameron, Greg Kroah-Hartman, Nuno Sá, Michael Hennerich
Cc: David Lechner, Andy Shevchenko, Joshua Crofts, linux, linux-iio,
linux-staging, linux-kernel, Abdelnasser Hussein
This series cleans up header inclusions in adt7316.c. Patch 1 sorts
the includes alphabetically. Patch 2 drops <linux/kernel.h> and
includes the headers the driver actually uses (IWYU), removing the
unused ones.
Changes in v4:
- Moved the list of added/dropped headers out of the patch 2 commit
message, as requested by Andy Shevchenko.
- Added Reviewed-by from Joshua Crofts.
Changes in v3:
- Split the series as suggested by Joshua Crofts: patch 1 only sorts
the headers, patch 2 replaces kernel.h and adds/drops headers.
Changes in v2:
- Split the original patch into a 2-patch series.
Abdelnasser Hussein (2):
staging: iio: addac: adt7316: sort headers alphabetically
staging: iio: addac: adt7316: replace kernel.h with explicit headers
drivers/staging/iio/addac/adt7316.c | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
--
2.56.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v4 1/2] staging: iio: addac: adt7316: sort headers alphabetically
2026-11-04 18:34 [PATCH v4 0/2] staging: iio: addac: adt7316: clean up header inclusions Abdelnasser Hussein
@ 2026-11-04 18:34 ` Abdelnasser Hussein
2026-11-07 20:29 ` Jonathan Cameron
2026-11-04 18:34 ` [PATCH v4 2/2] staging: iio: addac: adt7316: replace kernel.h with explicit headers Abdelnasser Hussein
2026-11-07 20:31 ` [PATCH v4 0/2] staging: iio: addac: adt7316: clean up header inclusions Jonathan Cameron
2 siblings, 1 reply; 5+ messages in thread
From: Abdelnasser Hussein @ 2026-11-04 18:34 UTC (permalink / raw)
To: Jonathan Cameron, Greg Kroah-Hartman, Nuno Sá, Michael Hennerich
Cc: David Lechner, Andy Shevchenko, Joshua Crofts, linux, linux-iio,
linux-staging, linux-kernel, Abdelnasser Hussein
Sort included headers alphabetically without altering the list of
inclusions. Keep the <linux/iio/*> subsystem headers separated from
the <linux/*> group, and add a blank line before the local "adt7316.h"
header.
Reviewed-by: Joshua Crofts <crofts@kernel.org>
Signed-off-by: Abdelnasser Hussein <abdelnasserhussein11@gmail.com>
---
drivers/staging/iio/addac/adt7316.c | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/iio/addac/adt7316.c b/drivers/staging/iio/addac/adt7316.c
index 20f6052cc7fb..515f1fdae46b 100644
--- a/drivers/staging/iio/addac/adt7316.c
+++ b/drivers/staging/iio/addac/adt7316.c
@@ -5,22 +5,23 @@
* Copyright 2010 Analog Devices Inc.
*/
-#include <linux/interrupt.h>
+#include <linux/device.h>
#include <linux/gpio/consumer.h>
+#include <linux/i2c.h>
+#include <linux/interrupt.h>
#include <linux/irq.h>
-#include <linux/workqueue.h>
-#include <linux/device.h>
#include <linux/kernel.h>
-#include <linux/slab.h>
-#include <linux/sysfs.h>
#include <linux/list.h>
-#include <linux/i2c.h>
-#include <linux/rtc.h>
#include <linux/module.h>
+#include <linux/rtc.h>
+#include <linux/slab.h>
+#include <linux/sysfs.h>
+#include <linux/workqueue.h>
-#include <linux/iio/iio.h>
#include <linux/iio/events.h>
+#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>
+
#include "adt7316.h"
/*
--
2.56.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v4 2/2] staging: iio: addac: adt7316: replace kernel.h with explicit headers
2026-11-04 18:34 [PATCH v4 0/2] staging: iio: addac: adt7316: clean up header inclusions Abdelnasser Hussein
2026-11-04 18:34 ` [PATCH v4 1/2] staging: iio: addac: adt7316: sort headers alphabetically Abdelnasser Hussein
@ 2026-11-04 18:34 ` Abdelnasser Hussein
2026-11-07 20:31 ` [PATCH v4 0/2] staging: iio: addac: adt7316: clean up header inclusions Jonathan Cameron
2 siblings, 0 replies; 5+ messages in thread
From: Abdelnasser Hussein @ 2026-11-04 18:34 UTC (permalink / raw)
To: Jonathan Cameron, Greg Kroah-Hartman, Nuno Sá, Michael Hennerich
Cc: David Lechner, Andy Shevchenko, Joshua Crofts, linux, linux-iio,
linux-staging, linux-kernel, Abdelnasser Hussein
Drop the proxy header <linux/kernel.h> and replace it with direct
inclusions per the Include What You Use (IWYU) principle. Also remove
unused headers and keep the list alphabetically sorted.
Reviewed-by: Joshua Crofts <crofts@kernel.org>
Signed-off-by: Abdelnasser Hussein <abdelnasserhussein11@gmail.com>
---
Headers added:
- <linux/bits.h> for BIT()
- <linux/err.h> for IS_ERR() and PTR_ERR()
- <linux/errno.h> for error codes (-EIO, -EPERM, -EINVAL, -ENOMEM,
-ENODEV)
- <linux/kstrtox.h> for kstrtou8(), kstrtou16() and kstrtoint()
- <linux/pm.h> for EXPORT_GPL_SIMPLE_DEV_PM_OPS()
- <linux/string.h> for memcmp()
- <linux/types.h> for u8, u16, bool and s64
Headers dropped:
- <linux/i2c.h>, <linux/kernel.h>, <linux/list.h>, <linux/rtc.h>,
<linux/slab.h> and <linux/workqueue.h>
Changes in v4:
- Moved the list of added/dropped headers out of the commit message.
drivers/staging/iio/addac/adt7316.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/iio/addac/adt7316.c b/drivers/staging/iio/addac/adt7316.c
index 515f1fdae46b..54d942cae586 100644
--- a/drivers/staging/iio/addac/adt7316.c
+++ b/drivers/staging/iio/addac/adt7316.c
@@ -5,18 +5,19 @@
* Copyright 2010 Analog Devices Inc.
*/
+#include <linux/bits.h>
#include <linux/device.h>
+#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/gpio/consumer.h>
-#include <linux/i2c.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
-#include <linux/kernel.h>
-#include <linux/list.h>
+#include <linux/kstrtox.h>
#include <linux/module.h>
-#include <linux/rtc.h>
-#include <linux/slab.h>
+#include <linux/pm.h>
+#include <linux/string.h>
#include <linux/sysfs.h>
-#include <linux/workqueue.h>
+#include <linux/types.h>
#include <linux/iio/events.h>
#include <linux/iio/iio.h>
--
2.56.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v4 1/2] staging: iio: addac: adt7316: sort headers alphabetically
2026-11-04 18:34 ` [PATCH v4 1/2] staging: iio: addac: adt7316: sort headers alphabetically Abdelnasser Hussein
@ 2026-11-07 20:29 ` Jonathan Cameron
0 siblings, 0 replies; 5+ messages in thread
From: Jonathan Cameron @ 2026-11-07 20:29 UTC (permalink / raw)
To: Abdelnasser Hussein
Cc: Greg Kroah-Hartman, Nuno Sá,
Michael Hennerich, David Lechner, Andy Shevchenko, Joshua Crofts,
linux, linux-iio, linux-staging, linux-kernel
On Wed, 4 Nov 2026 20:34:28 +0200
Abdelnasser Hussein <abdelnasserhussein11@gmail.com> wrote:
> Sort included headers alphabetically without altering the list of
> inclusions. Keep the <linux/iio/*> subsystem headers separated from
> the <linux/*> group, and add a blank line before the local "adt7316.h"
> header.
>
> Reviewed-by: Joshua Crofts <crofts@kernel.org>
> Signed-off-by: Abdelnasser Hussein <abdelnasserhussein11@gmail.com>
Needed a small tweak as kstrtox.h was added recently.
> ---
> drivers/staging/iio/addac/adt7316.c | 17 +++++++++--------
> 1 file changed, 9 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/staging/iio/addac/adt7316.c b/drivers/staging/iio/addac/adt7316.c
> index 20f6052cc7fb..515f1fdae46b 100644
> --- a/drivers/staging/iio/addac/adt7316.c
> +++ b/drivers/staging/iio/addac/adt7316.c
> @@ -5,22 +5,23 @@
> * Copyright 2010 Analog Devices Inc.
> */
>
> -#include <linux/interrupt.h>
> +#include <linux/device.h>
> #include <linux/gpio/consumer.h>
> +#include <linux/i2c.h>
> +#include <linux/interrupt.h>
> #include <linux/irq.h>
> -#include <linux/workqueue.h>
> -#include <linux/device.h>
> #include <linux/kernel.h>
> -#include <linux/slab.h>
> -#include <linux/sysfs.h>
> #include <linux/list.h>
> -#include <linux/i2c.h>
> -#include <linux/rtc.h>
> #include <linux/module.h>
> +#include <linux/rtc.h>
> +#include <linux/slab.h>
> +#include <linux/sysfs.h>
> +#include <linux/workqueue.h>
>
> -#include <linux/iio/iio.h>
> #include <linux/iio/events.h>
> +#include <linux/iio/iio.h>
> #include <linux/iio/sysfs.h>
> +
> #include "adt7316.h"
>
> /*
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v4 0/2] staging: iio: addac: adt7316: clean up header inclusions
2026-11-04 18:34 [PATCH v4 0/2] staging: iio: addac: adt7316: clean up header inclusions Abdelnasser Hussein
2026-11-04 18:34 ` [PATCH v4 1/2] staging: iio: addac: adt7316: sort headers alphabetically Abdelnasser Hussein
2026-11-04 18:34 ` [PATCH v4 2/2] staging: iio: addac: adt7316: replace kernel.h with explicit headers Abdelnasser Hussein
@ 2026-11-07 20:31 ` Jonathan Cameron
2 siblings, 0 replies; 5+ messages in thread
From: Jonathan Cameron @ 2026-11-07 20:31 UTC (permalink / raw)
To: Abdelnasser Hussein
Cc: Greg Kroah-Hartman, Nuno Sá,
Michael Hennerich, David Lechner, Andy Shevchenko, Joshua Crofts,
linux, linux-iio, linux-staging, linux-kernel
On Wed, 4 Nov 2026 20:34:27 +0200
Abdelnasser Hussein <abdelnasserhussein11@gmail.com> wrote:
> This series cleans up header inclusions in adt7316.c. Patch 1 sorts
> the includes alphabetically. Patch 2 drops <linux/kernel.h> and
> includes the headers the driver actually uses (IWYU), removing the
> unused ones.
Applied.
>
> Changes in v4:
> - Moved the list of added/dropped headers out of the patch 2 commit
> message, as requested by Andy Shevchenko.
> - Added Reviewed-by from Joshua Crofts.
>
> Changes in v3:
> - Split the series as suggested by Joshua Crofts: patch 1 only sorts
> the headers, patch 2 replaces kernel.h and adds/drops headers.
>
> Changes in v2:
> - Split the original patch into a 2-patch series.
>
> Abdelnasser Hussein (2):
> staging: iio: addac: adt7316: sort headers alphabetically
> staging: iio: addac: adt7316: replace kernel.h with explicit headers
>
> drivers/staging/iio/addac/adt7316.c | 22 ++++++++++++----------
> 1 file changed, 12 insertions(+), 10 deletions(-)
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-11-07 20:31 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-04 18:34 [PATCH v4 0/2] staging: iio: addac: adt7316: clean up header inclusions Abdelnasser Hussein
2026-11-04 18:34 ` [PATCH v4 1/2] staging: iio: addac: adt7316: sort headers alphabetically Abdelnasser Hussein
2026-11-07 20:29 ` Jonathan Cameron
2026-11-04 18:34 ` [PATCH v4 2/2] staging: iio: addac: adt7316: replace kernel.h with explicit headers Abdelnasser Hussein
2026-11-07 20:31 ` [PATCH v4 0/2] staging: iio: addac: adt7316: clean up header inclusions Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®