From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: linux-iio@vger.kernel.org, "Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Denis Ciocca" <denis.ciocca@st.com>,
"Vasileios Amoiridis" <vassilisamir@gmail.com>,
"Jonathan Cameron" <Jonathan.Cameron@huawei.com>
Subject: Re: [PATCH 1/7] iio: pressure: bmp280: Apply iwyu principles to includes.
Date: Thu, 10 Jul 2025 22:09:49 +0300 [thread overview]
Message-ID: <aHAP_c_7huR3igPC@smile.fi.intel.com> (raw)
In-Reply-To: <20250710171107.443790-2-jic23@kernel.org>
On Thu, Jul 10, 2025 at 06:11:01PM +0100, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
>
> The recent introduction of a warning on missing include of
> linux/export.h when W=1 motivated revisiting the includes in affected
> drivers. In general IWYU principles avoid complex include paths that
> make it hard to refactor headers.
>
> - Move linux/unaligned.h entry to appropriate place.
> - Drop comment on linux/irq.h as we don't generally keep a record
> in code of why includes are there.
>
> Remove
> - linux/device.h from bmp280-regmap.c as struct device forwards definition
> is enough.
> - linux/module.h from bmp280-regmap.c as the module stuff is all in the
> other files.
> Add all of:
> - linux/array_size.h for ARRAY_SIZE()
> - linux/device.h in the i2c and spi drivers
> - linux/err.h for PTR_ERR() etc and also assume includes errno.h
> - linux/export.h for EXPORT_SYMBOL*()
> - linux/jiffies.h for msecs_to_jiffies
> - linux/log2.h for ilog2()
> - linux/math64.h for div64_s64
> - linux/minmax.h for clamp_val()
> - linux/mod_devicetable.h for spi_device_id etc
> - linux/mutex.h for various mutex calls
> - linux/pm.h for pm_ptr()
> - linux/stddef.h for false / true
> - linux/string.h for memcpy
> - linux/string_choices.h for str_enable_disable
> - linux/time.h for USEC_PER_MSEC
> - linux/types.h for local bool definition.
>
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> ---
> I'm not sure on whether we should bother with stddef.h or types.h
> Looking for feedback on any others.
types.h is superior.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2025-07-10 19:09 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 [this message]
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 ` [PATCH 5/7] iio: pressure: hsc030pa: Apply IWYU " Jonathan Cameron
2025-07-10 17:11 ` [PATCH 6/7] iio: pressure: mprls0025pa: " 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=aHAP_c_7huR3igPC@smile.fi.intel.com \
--to=andriy.shevchenko@intel.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=andy@kernel.org \
--cc=denis.ciocca@st.com \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--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.