From: Joshua Crofts <crofts@kernel.org>
To: "Nuno Sá" <nuno.sa@analog.com>,
"Michael Hennerich" <Michael.Hennerich@analog.com>,
"Jonathan Cameron" <jic23@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Nishant Malpani" <nish.malpani25@gmail.com>
Cc: linux@analog.com, linux-iio@vger.kernel.org,
linux-kernel@vger.kernel.org, Joshua Crofts <crofts@kernel.org>
Subject: [PATCH 9/9] iio: gyro: st_gyro: apply iwyu principle
Date: Wed, 25 Nov 2026 20:24:10 +0100 [thread overview]
Message-ID: <20261125-gyro-kernel-header-removal-v1-9-969b3e668d35@kernel.org> (raw)
In-Reply-To: <20261125-gyro-kernel-header-removal-v1-0-969b3e668d35@kernel.org>
Remove the catch all kernel.h header and add/remove the remaining
headers in accordance with the IWYU principle.
Signed-off-by: Joshua Crofts <crofts@kernel.org>
---
drivers/iio/gyro/st_gyro_buffer.c | 1 -
drivers/iio/gyro/st_gyro_core.c | 7 +++++--
drivers/iio/gyro/st_gyro_i2c.c | 6 ++++--
drivers/iio/gyro/st_gyro_spi.c | 4 +++-
4 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/drivers/iio/gyro/st_gyro_buffer.c b/drivers/iio/gyro/st_gyro_buffer.c
index 1ebfe7aa6c96..a58545bfa7f0 100644
--- a/drivers/iio/gyro/st_gyro_buffer.c
+++ b/drivers/iio/gyro/st_gyro_buffer.c
@@ -7,7 +7,6 @@
* Denis Ciocca <denis.ciocca@st.com>
*/
-#include <linux/kernel.h>
#include <linux/iio/iio.h>
#include <linux/iio/buffer.h>
#include <linux/iio/trigger.h>
diff --git a/drivers/iio/gyro/st_gyro_core.c b/drivers/iio/gyro/st_gyro_core.c
index 7fd82cd707c7..1f0f5b12bdb8 100644
--- a/drivers/iio/gyro/st_gyro_core.c
+++ b/drivers/iio/gyro/st_gyro_core.c
@@ -7,11 +7,14 @@
* Denis Ciocca <denis.ciocca@st.com>
*/
-#include <linux/kernel.h>
+#include <linux/array_size.h>
+#include <linux/bits.h>
+#include <linux/errno.h>
+#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/mutex.h>
-#include <linux/interrupt.h>
#include <linux/sysfs.h>
+
#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>
#include <linux/iio/trigger.h>
diff --git a/drivers/iio/gyro/st_gyro_i2c.c b/drivers/iio/gyro/st_gyro_i2c.c
index a587e9023ceb..b98b19d93b1c 100644
--- a/drivers/iio/gyro/st_gyro_i2c.c
+++ b/drivers/iio/gyro/st_gyro_i2c.c
@@ -7,9 +7,11 @@
* Denis Ciocca <denis.ciocca@st.com>
*/
-#include <linux/kernel.h>
-#include <linux/module.h>
+#include <linux/dev_printk.h>
+#include <linux/errno.h>
#include <linux/i2c.h>
+#include <linux/module.h>
+
#include <linux/iio/iio.h>
#include <linux/iio/common/st_sensors.h>
diff --git a/drivers/iio/gyro/st_gyro_spi.c b/drivers/iio/gyro/st_gyro_spi.c
index c56331755b5c..b53e3d292a63 100644
--- a/drivers/iio/gyro/st_gyro_spi.c
+++ b/drivers/iio/gyro/st_gyro_spi.c
@@ -7,9 +7,11 @@
* Denis Ciocca <denis.ciocca@st.com>
*/
-#include <linux/kernel.h>
+#include <linux/dev_printk.h>
+#include <linux/errno.h>
#include <linux/module.h>
#include <linux/spi/spi.h>
+
#include <linux/iio/iio.h>
#include <linux/iio/common/st_sensors.h>
--
2.56.0
next prev parent reply other threads:[~2026-11-25 19:24 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-25 19:24 [PATCH 0/9] iio: gyro: header cleanups Joshua Crofts
2026-11-25 19:24 ` [PATCH 1/9] iio: gyro: adis16080: reorder headers Joshua Crofts
2026-11-25 19:24 ` [PATCH 2/9] iio: gyro: adis16080: apply iwyu principle Joshua Crofts
2026-11-25 19:24 ` [PATCH 3/9] iio: gyro: adis16136: " Joshua Crofts
2026-11-25 19:24 ` [PATCH 4/9] iio: gyro: adis16130: " Joshua Crofts
2026-11-25 21:57 ` Andy Shevchenko
2026-11-25 19:24 ` [PATCH 5/9] iio: gyro: adis16260: " Joshua Crofts
2026-11-25 19:24 ` [PATCH 6/9] iio: gyro: adxrs290: " Joshua Crofts
2026-11-25 19:24 ` [PATCH 7/9] iio: gyro: adxrs450: sort headers Joshua Crofts
2026-11-25 19:24 ` [PATCH 8/9] iio: gyro: adxrs450: apply iwyu principle Joshua Crofts
2026-11-25 19:24 ` Joshua Crofts [this message]
2026-11-25 21:59 ` [PATCH 0/9] iio: gyro: header cleanups Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261125-gyro-kernel-header-removal-v1-9-969b3e668d35@kernel.org \
--to=crofts@kernel.org \
--cc=Michael.Hennerich@analog.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@analog.com \
--cc=nish.malpani25@gmail.com \
--cc=nuno.sa@analog.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®