* [PATCH] iio: accel: stk8ba50: Update includes to match IWYU
@ 2026-06-03 1:50 Miao Li
2026-06-03 5:52 ` Andy Shevchenko
0 siblings, 1 reply; 4+ messages in thread
From: Miao Li @ 2026-06-03 1:50 UTC (permalink / raw)
To: jic23
Cc: dlechner, nuno.sa, andy, bigeasy, waqar.hameed, marcus.folkesson,
dixitparmar19, linux-iio, linux-kernel, limiao, limiao870622
From: Miao Li <limiao@kylinos.cn>
Update the list of included headers in stk8ba50.c using
Include-What-You-Use (IWYU) tool, mainly to remove kernel.h
and add missing headers such as array_size.h, bits.h,
dev_printk.h, etc.
Signed-off-by: Miao Li <limiao@kylinos.cn>
---
drivers/iio/accel/stk8ba50.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/iio/accel/stk8ba50.c b/drivers/iio/accel/stk8ba50.c
index a9ff2a273fe1..c40fb2a466fb 100644
--- a/drivers/iio/accel/stk8ba50.c
+++ b/drivers/iio/accel/stk8ba50.c
@@ -7,11 +7,17 @@
* STK8BA50 7-bit I2C address: 0x18.
*/
+#include <linux/array_size.h>
+#include <linux/bits.h>
+#include <linux/dev_printk.h>
+#include <linux/errno.h>
#include <linux/i2c.h>
#include <linux/interrupt.h>
-#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>
+#include <linux/mutex.h>
+#include <linux/pm.h>
+#include <linux/sysfs.h>
#include <linux/types.h>
#include <linux/iio/buffer.h>
#include <linux/iio/iio.h>
@@ -19,6 +25,7 @@
#include <linux/iio/trigger.h>
#include <linux/iio/triggered_buffer.h>
#include <linux/iio/trigger_consumer.h>
+#include <linux/iio/types.h>
#define STK8BA50_REG_XOUT 0x02
#define STK8BA50_REG_YOUT 0x04
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] iio: accel: stk8ba50: Update includes to match IWYU
2026-06-03 1:50 [PATCH] iio: accel: stk8ba50: Update includes to match IWYU Miao Li
@ 2026-06-03 5:52 ` Andy Shevchenko
2026-06-03 7:47 ` Waqar Hameed
0 siblings, 1 reply; 4+ messages in thread
From: Andy Shevchenko @ 2026-06-03 5:52 UTC (permalink / raw)
To: Miao Li
Cc: jic23, dlechner, nuno.sa, andy, bigeasy, waqar.hameed,
marcus.folkesson, dixitparmar19, linux-iio, linux-kernel, limiao
On Wed, Jun 03, 2026 at 09:50:33AM +0800, Miao Li wrote:
> Update the list of included headers in stk8ba50.c using
> Include-What-You-Use (IWYU) tool, mainly to remove kernel.h
> and add missing headers such as array_size.h, bits.h,
> dev_printk.h, etc.
...
> +#include <linux/array_size.h>
> +#include <linux/bits.h>
> +#include <linux/dev_printk.h>
> +#include <linux/errno.h>
> #include <linux/i2c.h>
> #include <linux/interrupt.h>
> -#include <linux/kernel.h>
> #include <linux/module.h>
> #include <linux/mod_devicetable.h>
> +#include <linux/mutex.h>
> +#include <linux/pm.h>
> +#include <linux/sysfs.h>
> #include <linux/types.h>
While at it, add a blank line here.
> #include <linux/iio/buffer.h>
> #include <linux/iio/iio.h>
...
> +#include <linux/iio/types.h>
Not sure if we need this one to be explicitly added when iio.h is included.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] iio: accel: stk8ba50: Update includes to match IWYU
2026-06-03 5:52 ` Andy Shevchenko
@ 2026-06-03 7:47 ` Waqar Hameed
2026-06-03 10:45 ` Jonathan Cameron
0 siblings, 1 reply; 4+ messages in thread
From: Waqar Hameed @ 2026-06-03 7:47 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Miao Li, jic23, dlechner, nuno.sa, andy, bigeasy,
marcus.folkesson, dixitparmar19, linux-iio, linux-kernel, limiao
On Wed, Jun 03, 2026 at 08:52 +0300 Andy Shevchenko <andriy.shevchenko@intel.com> wrote:
[...]
>> +#include <linux/iio/types.h>
>
> Not sure if we need this one to be explicitly added when iio.h is included.
I would vote for removing this, to be consistent with most other drivers.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] iio: accel: stk8ba50: Update includes to match IWYU
2026-06-03 7:47 ` Waqar Hameed
@ 2026-06-03 10:45 ` Jonathan Cameron
0 siblings, 0 replies; 4+ messages in thread
From: Jonathan Cameron @ 2026-06-03 10:45 UTC (permalink / raw)
To: Waqar Hameed
Cc: Andy Shevchenko, Miao Li, dlechner, nuno.sa, andy, bigeasy,
marcus.folkesson, dixitparmar19, linux-iio, linux-kernel, limiao
On Wed, 3 Jun 2026 09:47:06 +0200
Waqar Hameed <waqar.hameed@axis.com> wrote:
> On Wed, Jun 03, 2026 at 08:52 +0300 Andy Shevchenko <andriy.shevchenko@intel.com> wrote:
>
> [...]
>
> >> +#include <linux/iio/types.h>
> >
> > Not sure if we need this one to be explicitly added when iio.h is included.
>
> I would vote for removing this, to be consistent with most other drivers.
I've merged changes recently where some included this and some didn't.
I agree that we can assume iio.h will always include it so probably better
to drop it from these sorts of change. I don't want to see lots of patches dropping
from existing drivers though as that's just too much churn.
Jonathan
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-06-03 10:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-03 1:50 [PATCH] iio: accel: stk8ba50: Update includes to match IWYU Miao Li
2026-06-03 5:52 ` Andy Shevchenko
2026-06-03 7:47 ` Waqar Hameed
2026-06-03 10:45 ` Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox