* [PATCH v3] iio: frequency: ad9834: clean up includes
@ 2026-04-16 9:32 Joshua Crofts
2026-04-17 6:47 ` Andy Shevchenko
0 siblings, 1 reply; 6+ messages in thread
From: Joshua Crofts @ 2026-04-16 9:32 UTC (permalink / raw)
To: lars, Michael.Hennerich, jic23, gregkh
Cc: dlechner, nuno.sa, andy, linux-iio, linux-staging, linux-kernel,
Joshua Crofts
Cleanup include headers by removing proxy kernel.h header and
unnecessary list.h, interrupt.h, workqueue.h and slab.h headers. Added
additional headers that were previously included from kernel.h.
Verified using the include-what-you-use tool.
Signed-off-by: Joshua Crofts <joshua.crofts1@gmail.com>
---
drivers/staging/iio/frequency/ad9834.c | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/drivers/staging/iio/frequency/ad9834.c b/drivers/staging/iio/frequency/ad9834.c
index d339d5e8e0..9b65fbe1c7 100644
--- a/drivers/staging/iio/frequency/ad9834.c
+++ b/drivers/staging/iio/frequency/ad9834.c
@@ -5,18 +5,21 @@
* Copyright 2010-2011 Analog Devices Inc.
*/
+#include <linux/bits.h>
#include <linux/clk.h>
-#include <linux/interrupt.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/spi/spi.h>
-#include <linux/regulator/consumer.h>
+#include <linux/dev_printk.h>
#include <linux/err.h>
+#include <linux/kstrtox.h>
+#include <linux/mod_devicetable.h>
#include <linux/module.h>
+#include <linux/mutex.h>
+#include <linux/regulator/consumer.h>
+#include <linux/spi/spi.h>
+#include <linux/string.h>
+#include <linux/sysfs.h>
+#include <linux/types.h>
+
+#include <asm/byteorder.h>
#include <asm/div64.h>
#include <linux/iio/iio.h>
--
2.47.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v3] iio: frequency: ad9834: clean up includes
2026-04-16 9:32 [PATCH v3] iio: frequency: ad9834: clean up includes Joshua Crofts
@ 2026-04-17 6:47 ` Andy Shevchenko
2026-04-17 7:13 ` Joshua Crofts
0 siblings, 1 reply; 6+ messages in thread
From: Andy Shevchenko @ 2026-04-17 6:47 UTC (permalink / raw)
To: Joshua Crofts
Cc: lars, Michael.Hennerich, jic23, gregkh, dlechner, nuno.sa, andy,
linux-iio, linux-staging, linux-kernel
On Thu, Apr 16, 2026 at 09:32:40AM +0000, Joshua Crofts wrote:
> Cleanup include headers by removing proxy kernel.h header and
> unnecessary list.h, interrupt.h, workqueue.h and slab.h headers. Added
> additional headers that were previously included from kernel.h.
>
> Verified using the include-what-you-use tool.
I'm wondering why in previous round the tool haven't noticed what I did...
...
> +#include <linux/bits.h>
> #include <linux/clk.h>
> -#include <linux/interrupt.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/spi/spi.h>
> -#include <linux/regulator/consumer.h>
> +#include <linux/dev_printk.h>
> #include <linux/err.h>
> +#include <linux/kstrtox.h>
> +#include <linux/mod_devicetable.h>
> #include <linux/module.h>
> +#include <linux/mutex.h>
> +#include <linux/regulator/consumer.h>
> +#include <linux/spi/spi.h>
> +#include <linux/string.h>
Hmm... What's used for here?
> +#include <linux/sysfs.h>
> +#include <linux/types.h>
> +
> +#include <asm/byteorder.h>
> #include <asm/div64.h>
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3] iio: frequency: ad9834: clean up includes
2026-04-17 6:47 ` Andy Shevchenko
@ 2026-04-17 7:13 ` Joshua Crofts
2026-04-17 7:26 ` Andy Shevchenko
0 siblings, 1 reply; 6+ messages in thread
From: Joshua Crofts @ 2026-04-17 7:13 UTC (permalink / raw)
To: Andy Shevchenko
Cc: lars, Michael.Hennerich, jic23, gregkh, dlechner, nuno.sa, andy,
linux-iio, linux-staging, linux-kernel
On Fri, 17 Apr 2026 at 08:47, Andy Shevchenko
<andriy.shevchenko@intel.com> wrote:
> I'm wondering why in previous round the tool haven't noticed what I did...
Yeah, the tool is pretty noisy unfortunately, even with tweaking it's
not exactly 100%.
> > +#include <linux/string.h>
>
> Hmm... What's used for here?
sysfs_streq() is defined in linux/string.h.
--
Kind regards
CJD
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3] iio: frequency: ad9834: clean up includes
2026-04-17 7:13 ` Joshua Crofts
@ 2026-04-17 7:26 ` Andy Shevchenko
2026-04-17 7:34 ` Joshua Crofts
0 siblings, 1 reply; 6+ messages in thread
From: Andy Shevchenko @ 2026-04-17 7:26 UTC (permalink / raw)
To: Joshua Crofts
Cc: lars, Michael.Hennerich, jic23, gregkh, dlechner, nuno.sa, andy,
linux-iio, linux-staging, linux-kernel
On Fri, Apr 17, 2026 at 09:13:27AM +0200, Joshua Crofts wrote:
> On Fri, 17 Apr 2026 at 08:47, Andy Shevchenko
> <andriy.shevchenko@intel.com> wrote:
> > I'm wondering why in previous round the tool haven't noticed what I did...
>
> Yeah, the tool is pretty noisy unfortunately, even with tweaking it's
> not exactly 100%.
Yes, that's why one still needs to understand more about headers in the Linux
kernel to do such a "simple" change.
> > > +#include <linux/string.h>
> >
> > Hmm... What's used for here?
>
> sysfs_streq() is defined in linux/string.h.
Oh, surprise surprise :-), thanks for pointing this out!
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3] iio: frequency: ad9834: clean up includes
2026-04-17 7:26 ` Andy Shevchenko
@ 2026-04-17 7:34 ` Joshua Crofts
2026-04-19 16:59 ` Jonathan Cameron
0 siblings, 1 reply; 6+ messages in thread
From: Joshua Crofts @ 2026-04-17 7:34 UTC (permalink / raw)
To: Andy Shevchenko
Cc: lars, Michael.Hennerich, jic23, gregkh, dlechner, nuno.sa, andy,
linux-iio, linux-staging, linux-kernel
On Fri, 17 Apr 2026 at 09:26, Andy Shevchenko
<andriy.shevchenko@intel.com> wrote:
> Yes, that's why one still needs to understand more about headers in the Linux
> kernel to do such a "simple" change.
Yup, it's definitely a task that seems easy on the surface level (but
isn't). Also the concept of
kernel.h is truly a fun one.
> Oh, surprise surprise :-), thanks for pointing this out!
No problem, surprisingly one of the things that IWYU got right.
--
Kind regards
CJD
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3] iio: frequency: ad9834: clean up includes
2026-04-17 7:34 ` Joshua Crofts
@ 2026-04-19 16:59 ` Jonathan Cameron
0 siblings, 0 replies; 6+ messages in thread
From: Jonathan Cameron @ 2026-04-19 16:59 UTC (permalink / raw)
To: Joshua Crofts
Cc: Andy Shevchenko, lars, Michael.Hennerich, gregkh, dlechner,
nuno.sa, andy, linux-iio, linux-staging, linux-kernel
On Fri, 17 Apr 2026 09:34:38 +0200
Joshua Crofts <joshua.crofts1@gmail.com> wrote:
> On Fri, 17 Apr 2026 at 09:26, Andy Shevchenko
> <andriy.shevchenko@intel.com> wrote:
> > Yes, that's why one still needs to understand more about headers in the Linux
> > kernel to do such a "simple" change.
>
> Yup, it's definitely a task that seems easy on the surface level (but
> isn't). Also the concept of
> kernel.h is truly a fun one.
>
> > Oh, surprise surprise :-), thanks for pointing this out!
>
> No problem, surprisingly one of the things that IWYU got right.
>
Looks fine to me.
Applied to the testing branch of iio.git
Thanks,
Jonathan
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-04-19 16:59 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-16 9:32 [PATCH v3] iio: frequency: ad9834: clean up includes Joshua Crofts
2026-04-17 6:47 ` Andy Shevchenko
2026-04-17 7:13 ` Joshua Crofts
2026-04-17 7:26 ` Andy Shevchenko
2026-04-17 7:34 ` Joshua Crofts
2026-04-19 16:59 ` Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox