Linux IIO development
 help / color / mirror / Atom feed
* [PATCH v4] iio: accel: stk8ba50: Update includes to match IWYU
@ 2026-06-20  1:59 Miao Li
  2026-06-20  6:55 ` Joshua Crofts
  0 siblings, 1 reply; 3+ messages in thread
From: Miao Li @ 2026-06-20  1:59 UTC (permalink / raw)
  To: jic23
  Cc: andy, joshua.crofts1, dlechner, nuno.sa, marcus.folkesson,
	dixitparmar19, bigeasy, linux-iio, linux-kernel, limiao870622,
	Miao Li, Andy Shevchenko

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, bitops.h,
dev_printk.h, etc.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Miao Li <limiao@kylinos.cn>
---

Changes in v4:
- Removing <linux/bits.h> and adding <linux/bitops.h> instead,
  as sign_extend32() is declared in <linux/bitops.h>, 
  and <linux/bitops.h> already includes <linux/bits.h>.
- Link to v3:
  https://lore.kernel.org/all/20260617013834.166337-1-limiao870622@163.com/

Changes in v3:
- Put the changelog after cutter line, no functional changes.
- Link to v2:
  https://lore.kernel.org/all/20260615092116.83850-1-limiao870622@163.com/

Changes in v2:
- Drop linux/iio/types.h as it is already included by linux/iio/iio.h
- Link to v1:
  https://lore.kernel.org/all/20260603015033.187735-1-limiao870622@163.com/

 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..e2cd5a528c16 100644
--- a/drivers/iio/accel/stk8ba50.c
+++ b/drivers/iio/accel/stk8ba50.c
@@ -7,12 +7,19 @@
  * STK8BA50 7-bit I2C address: 0x18.
  */
 
+#include <linux/array_size.h>
+#include <linux/bitops.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>
 #include <linux/iio/sysfs.h>
-- 
2.25.1


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

end of thread, other threads:[~2026-06-21 16:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-20  1:59 [PATCH v4] iio: accel: stk8ba50: Update includes to match IWYU Miao Li
2026-06-20  6:55 ` Joshua Crofts
2026-06-21 16:51   ` Jonathan Cameron

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