public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: David Lechner <dlechner@baylibre.com>
To: Caio Morais <caiomorais@usp.br>,
	jic23@kernel.org, nuno.sa@analog.com, andy@kernel.org,
	michal.simek@amd.com
Cc: linux-iio@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] iio: fix header includes across multiple drivers
Date: Thu, 23 Apr 2026 13:45:12 -0500	[thread overview]
Message-ID: <a9307e04-3754-465e-a610-92c6e83cc3e6@baylibre.com> (raw)
In-Reply-To: <20260423183349.636757-1-caiomorais@usp.br>

On 4/23/26 1:33 PM, Caio Morais wrote:
> From: Caio Morais <caiomorais@usp.br>
> 
> Remove unnecessary includes and add missing ones as reported by the
> include-what-you-use (IWYU) tool.
> 
> Files changed:
> - drivers/iio/adc/xilinx-xadc-events.c
> - drivers/iio/buffer/industrialio-triggered-buffer.c
> - drivers/iio/common/st_sensors/st_sensors_i2c.c
> - drivers/iio/common/st_sensors/st_sensors_spi.c

We'll want to split these up, one patch per file in case they every
need to be backported as a dependency to a fix.

> 
> Signed-off-by: Caio Morais <caiomorais@usp.br>
> ---
>  drivers/iio/adc/xilinx-xadc-events.c               | 4 ++--
>  drivers/iio/buffer/industrialio-triggered-buffer.c | 8 ++++----
>  drivers/iio/common/st_sensors/st_sensors_i2c.c     | 2 +-
>  3 files changed, 7 insertions(+), 7 deletions(-)

This looks like sorting alphabetically, not actually adding or removing
any headers as seen by the equal number of insertions and deletions.

Usually we don't bother with sorting unless we are making other
changes on top of that.

> 
> diff --git a/drivers/iio/adc/xilinx-xadc-events.c b/drivers/iio/adc/xilinx-xadc-events.c
> index d16e61953..20b796ec7 100644
> --- a/drivers/iio/adc/xilinx-xadc-events.c
> +++ b/drivers/iio/adc/xilinx-xadc-events.c
> @@ -7,11 +7,11 @@
>   */
>  
>  #include <linux/bitmap.h>
> -#include <linux/types.h>
>  #include <linux/errno.h>
> -#include <linux/mutex.h>
>  #include <linux/iio/events.h>
>  #include <linux/iio/iio.h>
> +#include <linux/mutex.h>
> +#include <linux/types.h>
>  
>  #include "xilinx-xadc.h"
>  
> diff --git a/drivers/iio/buffer/industrialio-triggered-buffer.c b/drivers/iio/buffer/industrialio-triggered-buffer.c
> index 601a26398..5796c9da7 100644
> --- a/drivers/iio/buffer/industrialio-triggered-buffer.c
> +++ b/drivers/iio/buffer/industrialio-triggered-buffer.c
> @@ -5,15 +5,15 @@
>   */
>  
>  #include <linux/errno.h>
> -#include <linux/linkage.h>
> -#include <linux/module.h>
> -#include <linux/stddef.h>
> -#include <linux/iio/iio.h>
>  #include <linux/iio/buffer.h>
>  #include <linux/iio/buffer_impl.h>
> +#include <linux/iio/iio.h>
>  #include <linux/iio/kfifo_buf.h>
>  #include <linux/iio/triggered_buffer.h>
>  #include <linux/iio/trigger_consumer.h>
> +#include <linux/linkage.h>
> +#include <linux/module.h>
> +#include <linux/stddef.h>
>  
>  /**
>   * iio_triggered_buffer_setup_ext() - Setup triggered buffer and pollfunc
> diff --git a/drivers/iio/common/st_sensors/st_sensors_i2c.c b/drivers/iio/common/st_sensors/st_sensors_i2c.c
> index 6ab143498..974e349ae 100644
> --- a/drivers/iio/common/st_sensors/st_sensors_i2c.c
> +++ b/drivers/iio/common/st_sensors/st_sensors_i2c.c
> @@ -10,10 +10,10 @@
>  #include <linux/device.h>
>  #include <linux/err.h>
>  #include <linux/i2c.h>
> +#include <linux/iio/iio.h>
>  #include <linux/linkage.h>
>  #include <linux/module.h>
>  #include <linux/regmap.h>
> -#include <linux/iio/iio.h>

On this one, it would be more logical to move the iio header
down one line to group it with the one below.

>  
>  #include <linux/iio/common/st_sensors_i2c.h>
>  



  reply	other threads:[~2026-04-23 18:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-23 18:33 [PATCH] iio: fix header includes across multiple drivers Caio Morais
2026-04-23 18:45 ` David Lechner [this message]
2026-04-24  9:45   ` 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=a9307e04-3754-465e-a610-92c6e83cc3e6@baylibre.com \
    --to=dlechner@baylibre.com \
    --cc=andy@kernel.org \
    --cc=caiomorais@usp.br \
    --cc=jic23@kernel.org \
    --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