public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Caio Morais <caiomorais@usp.br>
Cc: andy@kernel.org, dlechner@baylibre.com, michal.simek@amd.com,
	nuno.sa@analog.com, linux-arm-kernel@lists.infradead.org,
	linux-iio@vger.kernel.org
Subject: Re: [PATCH 3/3] iio: common: st_sensors: fix includes with IWYU
Date: Mon, 27 Apr 2026 11:10:50 +0100	[thread overview]
Message-ID: <20260427111050.7fbf88a1@jic23-huawei> (raw)
In-Reply-To: <20260426211834.3318306-4-caiomorais@usp.br>

On Sun, 26 Apr 2026 18:18:02 -0300
Caio Morais <caiomorais@usp.br> wrote:

> From: Caio Morais <caiomorais@usp.br>
> 
> Signed-off-by: Caio Morais <caiomorais@usp.br>
> ---
>  drivers/iio/common/st_sensors/st_sensors_i2c.c | 7 +++++--
>  drivers/iio/common/st_sensors/st_sensors_spi.c | 9 +++++++--
>  2 files changed, 12 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/iio/common/st_sensors/st_sensors_i2c.c b/drivers/iio/common/st_sensors/st_sensors_i2c.c
> index 7156302fe..04d106def 100644
> --- a/drivers/iio/common/st_sensors/st_sensors_i2c.c
> +++ b/drivers/iio/common/st_sensors/st_sensors_i2c.c
> @@ -7,12 +7,15 @@
>   * Denis Ciocca <denis.ciocca@st.com>
>   */
>  
> +#include <linux/device.h>
> +#include <linux/err.h>
>  #include <linux/i2c.h>
> -#include <linux/kernel.h>
> +#include <linux/linkage.h>
>  #include <linux/module.h>
> -#include <linux/iio/iio.h>
>  #include <linux/regmap.h>
>  
> +#include <linux/iio/iio.h>
> +
>  #include <linux/iio/common/st_sensors_i2c.h>
>  
>  #define ST_SENSORS_I2C_MULTIREAD	0x80
> diff --git a/drivers/iio/common/st_sensors/st_sensors_spi.c b/drivers/iio/common/st_sensors/st_sensors_spi.c
> index 0da270139..884077d51 100644
> --- a/drivers/iio/common/st_sensors/st_sensors_spi.c
> +++ b/drivers/iio/common/st_sensors/st_sensors_spi.c
> @@ -7,12 +7,17 @@
>   * Denis Ciocca <denis.ciocca@st.com>
>   */
>  
> -#include <linux/kernel.h>
> +#include <linux/device.h>
This one is similar to kernel.h in that it's mostly a catch all header
that we prefer to replace if possible with more specific ones.

Now the driver might directly dereference a struct device, but if
so that normally indicates something we should clean up.
Maybe it's something else.  As mentioned in previous review
providing that info under the --- in the patch can save time on
questions like this.

> +#include <linux/err.h>
> +#include <linux/linkage.h>
>  #include <linux/module.h>
> -#include <linux/iio/iio.h>
>  #include <linux/property.h>
>  #include <linux/regmap.h>
>  #include <linux/spi/spi.h>
> +#include <linux/stddef.h>
> +#include <linux/types.h>
> +
> +#include <linux/iio/iio.h>
>  
>  #include <linux/iio/common/st_sensors_spi.h>
>  



  reply	other threads:[~2026-04-27 10:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-26 21:17 [PATCH v2 0/3]: fix unnecessary includes and add missing ones across multiple drivers Caio Morais
2026-04-26 21:18 ` [PATCH 1/3] iio: adc: xilinx-xadc: remove unnecessary includes and add missing ones Caio Morais
2026-04-27  6:42   ` Joshua Crofts
2026-04-27  9:50     ` Andy Shevchenko
2026-04-27 10:00       ` Joshua Crofts
2026-04-27 10:05     ` Jonathan Cameron
2026-04-26 21:18 ` [PATCH 2/3] iio: buffer: industrialio-triggered-buffer: fix includes with IWYU Caio Morais
2026-04-27  9:59   ` Andy Shevchenko
2026-04-27 10:08   ` Jonathan Cameron
2026-04-26 21:18 ` [PATCH 3/3] iio: common: st_sensors: " Caio Morais
2026-04-27 10:10   ` Jonathan Cameron [this message]
2026-04-27 10:03 ` [PATCH v2 0/3]: fix unnecessary includes and add missing ones across multiple drivers 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=20260427111050.7fbf88a1@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=andy@kernel.org \
    --cc=caiomorais@usp.br \
    --cc=dlechner@baylibre.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=michal.simek@amd.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