mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] iio: accel: stk8312: Update includes to match IWYU
@ 2026-06-03  1:47 Miao Li
  2026-06-03  5:53 ` Andy Shevchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Miao Li @ 2026-06-03  1:47 UTC (permalink / raw)
  To: jic23
  Cc: dlechner, nuno.sa, andy, dixitparmar19, waqar.hameed, linux-iio,
	linux-kernel, limiao, limiao870622

From: Miao Li <limiao@kylinos.cn>

Update the list of included headers in stk8312.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/stk8312.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/drivers/iio/accel/stk8312.c b/drivers/iio/accel/stk8312.c
index f31c6ab3392d..bcfdc92b7f81 100644
--- a/drivers/iio/accel/stk8312.c
+++ b/drivers/iio/accel/stk8312.c
@@ -7,11 +7,18 @@
  * IIO driver for STK8312; 7-bit I2C address: 0x3D.
  */
 
+#include <linux/array_size.h>
+#include <linux/bits.h>
+#include <linux/delay.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/delay.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 +26,7 @@
 #include <linux/iio/trigger.h>
 #include <linux/iio/triggered_buffer.h>
 #include <linux/iio/trigger_consumer.h>
+#include <linux/iio/types.h>
 
 #define STK8312_REG_XOUT		0x00
 #define STK8312_REG_YOUT		0x01
-- 
2.25.1


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

* Re: [PATCH] iio: accel: stk8312: Update includes to match IWYU
  2026-06-03  1:47 [PATCH] iio: accel: stk8312: Update includes to match IWYU Miao Li
@ 2026-06-03  5:53 ` Andy Shevchenko
  2026-06-03 10:56   ` Jonathan Cameron
  0 siblings, 1 reply; 3+ messages in thread
From: Andy Shevchenko @ 2026-06-03  5:53 UTC (permalink / raw)
  To: Miao Li
  Cc: jic23, dlechner, nuno.sa, andy, dixitparmar19, waqar.hameed,
	linux-iio, linux-kernel, limiao

On Wed, Jun 03, 2026 at 09:47:54AM +0800, Miao Li wrote:

> Update the list of included headers in stk8312.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.

Same comments as per your other patch.

-- 
With Best Regards,
Andy Shevchenko



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

* Re: [PATCH] iio: accel: stk8312: Update includes to match IWYU
  2026-06-03  5:53 ` Andy Shevchenko
@ 2026-06-03 10:56   ` Jonathan Cameron
  0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Cameron @ 2026-06-03 10:56 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Miao Li, dlechner, nuno.sa, andy, dixitparmar19, waqar.hameed,
	linux-iio, linux-kernel, limiao

On Wed, 3 Jun 2026 08:53:24 +0300
Andy Shevchenko <andriy.shevchenko@intel.com> wrote:

> On Wed, Jun 03, 2026 at 09:47:54AM +0800, Miao Li wrote:
> 
> > Update the list of included headers in stk8312.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.  
> 
> Same comments as per your other patch.
> 

Main take away here is if you are sending a new type of change,
test the waters (and get initial feedback) on that change applied
to a single driver.  That way you don't waste your time or that
of reviewers on common problems.

Thanks,

Jonathan

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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-03  1:47 [PATCH] iio: accel: stk8312: Update includes to match IWYU Miao Li
2026-06-03  5:53 ` Andy Shevchenko
2026-06-03 10:56   ` 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®