From: Jonathan Cameron <jic23@kernel.org>
To: linux-iio@vger.kernel.org, "Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"David Lechner" <dlechner@baylibre.com>
Cc: Denis Ciocca <denis.ciocca@st.com>,
Vasileios Amoiridis <vassilisamir@gmail.com>,
Jonathan Cameron <Jonathan.Cameron@huawei.com>
Subject: [PATCH 5/7] iio: pressure: hsc030pa: Apply IWYU principles to includes.
Date: Thu, 10 Jul 2025 18:11:05 +0100 [thread overview]
Message-ID: <20250710171107.443790-6-jic23@kernel.org> (raw)
In-Reply-To: <20250710171107.443790-1-jic23@kernel.org>
From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Motivated by solving the W=1 warning recently added that notes that
linux/export.h wasn't included here. Do a thorough job by applying
approximate include what you use principles to includes. In this
particular case there were quite a few unnecessary includes that are
removed.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
---
drivers/iio/pressure/hsc030pa.c | 12 ++++++------
drivers/iio/pressure/hsc030pa.h | 5 ++---
drivers/iio/pressure/hsc030pa_i2c.c | 4 ----
drivers/iio/pressure/hsc030pa_spi.c | 5 -----
4 files changed, 8 insertions(+), 18 deletions(-)
diff --git a/drivers/iio/pressure/hsc030pa.c b/drivers/iio/pressure/hsc030pa.c
index 2d00c0656259..44f97ba1629f 100644
--- a/drivers/iio/pressure/hsc030pa.c
+++ b/drivers/iio/pressure/hsc030pa.c
@@ -10,25 +10,25 @@
#include <linux/array_size.h>
#include <linux/bitfield.h>
#include <linux/bits.h>
-#include <linux/cleanup.h>
-#include <linux/init.h>
+#include <linux/device.h>
+#include <linux/errno.h>
+#include <linux/export.h>
+#include <linux/interrupt.h>
#include <linux/math64.h>
-#include <linux/mod_devicetable.h>
#include <linux/module.h>
-#include <linux/printk.h>
#include <linux/property.h>
#include <linux/regulator/consumer.h>
+#include <linux/stddef.h>
#include <linux/string.h>
#include <linux/types.h>
+#include <linux/unaligned.h>
#include <linux/units.h>
#include <linux/iio/buffer.h>
#include <linux/iio/iio.h>
-#include <linux/iio/sysfs.h>
#include <linux/iio/trigger_consumer.h>
#include <linux/iio/triggered_buffer.h>
-#include <linux/unaligned.h>
#include "hsc030pa.h"
diff --git a/drivers/iio/pressure/hsc030pa.h b/drivers/iio/pressure/hsc030pa.h
index 5db46784f4c6..01f2b02a84e8 100644
--- a/drivers/iio/pressure/hsc030pa.h
+++ b/drivers/iio/pressure/hsc030pa.h
@@ -8,6 +8,8 @@
#ifndef _HSC030PA_H
#define _HSC030PA_H
+#include <linux/compiler.h>
+#include <linux/minmax.h>
#include <linux/types.h>
#include <linux/iio/iio.h>
@@ -17,9 +19,6 @@
struct device;
-struct iio_chan_spec;
-struct iio_dev;
-
struct hsc_data;
struct hsc_chip_data;
diff --git a/drivers/iio/pressure/hsc030pa_i2c.c b/drivers/iio/pressure/hsc030pa_i2c.c
index a34ef4653f34..96aefd9f213a 100644
--- a/drivers/iio/pressure/hsc030pa_i2c.c
+++ b/drivers/iio/pressure/hsc030pa_i2c.c
@@ -9,14 +9,10 @@
*/
#include <linux/delay.h>
-#include <linux/device.h>
#include <linux/errno.h>
#include <linux/i2c.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
-#include <linux/types.h>
-
-#include <linux/iio/iio.h>
#include "hsc030pa.h"
diff --git a/drivers/iio/pressure/hsc030pa_spi.c b/drivers/iio/pressure/hsc030pa_spi.c
index 5d331b3b6da8..ae9f4bb51f30 100644
--- a/drivers/iio/pressure/hsc030pa_spi.c
+++ b/drivers/iio/pressure/hsc030pa_spi.c
@@ -9,14 +9,9 @@
*/
#include <linux/delay.h>
-#include <linux/device.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/spi/spi.h>
-#include <linux/stddef.h>
-#include <linux/types.h>
-
-#include <linux/iio/iio.h>
#include "hsc030pa.h"
--
2.50.0
next prev parent reply other threads:[~2025-07-10 17:11 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-10 17:11 [PATCH 0/7] IIO: More application of IWYU principles to includes Jonathan Cameron
2025-07-10 17:11 ` [PATCH 1/7] iio: pressure: bmp280: Apply iwyu " Jonathan Cameron
2025-07-10 19:09 ` Andy Shevchenko
2025-07-10 17:11 ` [PATCH 2/7] iio: pressure: zpa2326: " Jonathan Cameron
2025-07-10 17:11 ` [PATCH 3/7] iio: pressure: mpl115: " Jonathan Cameron
2025-07-10 17:11 ` [PATCH 4/7] iio: pressure: ms5611: " Jonathan Cameron
2025-07-10 17:11 ` Jonathan Cameron [this message]
2025-07-10 17:11 ` [PATCH 6/7] iio: pressure: mprls0025pa: Apply IWYU " Jonathan Cameron
2025-07-10 17:11 ` [PATCH 7/7] iio: st_sensors: " Jonathan Cameron
2025-07-10 19:09 ` [PATCH 0/7] IIO: More application of " Andy Shevchenko
2025-07-10 19:28 ` David Lechner
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=20250710171107.443790-6-jic23@kernel.org \
--to=jic23@kernel.org \
--cc=Jonathan.Cameron@huawei.com \
--cc=andy@kernel.org \
--cc=denis.ciocca@st.com \
--cc=dlechner@baylibre.com \
--cc=linux-iio@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=vassilisamir@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.