From: Joshua Crofts <joshua.crofts1@gmail.com>
To: "Jonathan Cameron" <jic23@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>, "Crt Mori" <cmo@melexis.com>,
"Puranjay Mohan" <puranjay@kernel.org>
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
Joshua Crofts <joshua.crofts1@gmail.com>
Subject: [PATCH v2 03/11] iio: temperature: ltc2983: make headers conform to IWYU
Date: Mon, 31 Aug 2026 23:13:33 +0200 [thread overview]
Message-ID: <20260831-kernel-header-removal-v2-3-b92b580ef5eb@gmail.com> (raw)
In-Reply-To: <20260831-kernel-header-removal-v2-0-b92b580ef5eb@gmail.com>
Remove the catch-all kernel.h header and add the missing headers to
enforce IWYU (some standard headers are already include subheaders,
i.e. errno.h is included by err.h).
Signed-off-by: Joshua Crofts <joshua.crofts1@gmail.com>
---
Header changes explained:
Added:
- <linux/array_size.h>: for ARRAY_SIZE()
- <linux/bitops.h>: for bitwise operations
- <linux/container_of.h>: for container_of macro
- <linux/delay.h>: for usleep_range()
- <linux/gpio/consumer.h>: for GPIO functions
- <linux/math64.h>: for div64 functions
- <linux/mutex.h>: for struct mutex and mutex_lock/unlock
- <linux/pm_runtime.h>: for DEFINE_SIMPLE_DEV_PM_OPS
- <linux/slab.h>: for memory allocation
- <linux/types.h>: for fixed-width integer types (u8, u16, etc.)
Removed:
- <linux/errno.h>: not directly used in this driver
- <linux/kernel.h>: catch-all header no longer needed
---
drivers/iio/temperature/ltc2983.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/drivers/iio/temperature/ltc2983.c b/drivers/iio/temperature/ltc2983.c
index fe9eec3058d4..6655453c9abf 100644
--- a/drivers/iio/temperature/ltc2983.c
+++ b/drivers/iio/temperature/ltc2983.c
@@ -5,19 +5,29 @@
*
* Copyright 2019 Analog Devices Inc.
*/
+
+#include <linux/array_size.h>
#include <linux/bitfield.h>
+#include <linux/bitops.h>
#include <linux/completion.h>
+#include <linux/container_of.h>
+#include <linux/delay.h>
#include <linux/device.h>
#include <linux/err.h>
-#include <linux/errno.h>
-#include <linux/kernel.h>
+#include <linux/gpio/consumer.h>
#include <linux/interrupt.h>
#include <linux/list.h>
+#include <linux/math64.h>
#include <linux/module.h>
+#include <linux/mutex.h>
+#include <linux/pm_runtime.h>
#include <linux/property.h>
#include <linux/regmap.h>
#include <linux/regulator/consumer.h>
+#include <linux/slab.h>
#include <linux/spi/spi.h>
+#include <linux/string.h>
+#include <linux/types.h>
#include <linux/unaligned.h>
#include <asm/byteorder.h>
--
2.55.0
next prev parent reply other threads:[~2026-08-31 21:13 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-31 21:13 [PATCH v2 00/11] iio: temperature: make headers conform to IWYU Joshua Crofts
2026-08-31 21:13 ` [PATCH v2 01/11] iio: temperature: iqs620at-temp: " Joshua Crofts
2026-08-31 21:13 ` [PATCH v2 02/11] iio: temperature: ltc2983: reorder headers Joshua Crofts
2026-08-31 21:13 ` Joshua Crofts [this message]
2026-08-31 21:13 ` [PATCH v2 04/11] iio: temperature: mlx90632: make headers conform to IWYU Joshua Crofts
2026-08-31 21:13 ` [PATCH v2 05/11] iio: temperature: mlx90635: " Joshua Crofts
2026-08-31 21:13 ` [PATCH v2 06/11] iio: temperature: tmp117: sort headers alphabetically Joshua Crofts
2026-08-31 21:13 ` [PATCH v2 07/11] iio: temperature: tmp117: make headers conform to IWYU Joshua Crofts
2026-08-31 21:13 ` [PATCH v2 08/11] iio: temperature: tsys01: reorder headers Joshua Crofts
2026-08-31 21:13 ` [PATCH v2 09/11] iio: temperature: tsys01: make headers conform to IWYU Joshua Crofts
2026-08-31 21:13 ` [PATCH v2 10/11] iio: temperature: tsys02d: reorder headers Joshua Crofts
2026-08-31 21:13 ` [PATCH v2 11/11] iio: temperature: tsys02d: make headers conform to IWYU Joshua Crofts
2026-09-01 5:09 ` [PATCH v2 00/11] iio: temperature: " Joshua Crofts
2026-09-01 7:55 ` Joshua Crofts
2026-09-05 0:10 ` Jonathan Cameron
-- strict thread matches above, loose matches on Subject: below --
2026-08-29 16:25 Joshua Crofts
2026-08-29 16:26 ` [PATCH v2 03/11] iio: temperature: ltc2983: " Joshua Crofts
2026-08-29 17:57 ` Jonathan Cameron
2026-08-29 20:24 ` Joshua Crofts
2026-08-29 23:48 ` Jonathan Cameron
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=20260831-kernel-header-removal-v2-3-b92b580ef5eb@gmail.com \
--to=joshua.crofts1@gmail.com \
--cc=andy@kernel.org \
--cc=cmo@melexis.com \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=puranjay@kernel.org \
/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.