From: Jonathan Cameron <jic23@kernel.org>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: Lars-Peter Clausen <lars@metafoo.de>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
linux-iio@vger.kernel.org
Subject: Re: [PATCH 2/2] iio: st_sensors: Remove some redundant includes in st_sensors.h
Date: Sat, 17 Jun 2023 19:49:11 +0100 [thread overview]
Message-ID: <20230617194911.7963bd6d@jic23-huawei> (raw)
In-Reply-To: <bd7fa0b07c85172ecba384e239cb0ecf0780766a.1686600780.git.christophe.jaillet@wanadoo.fr>
On Mon, 12 Jun 2023 22:13:37 +0200
Christophe JAILLET <christophe.jaillet@wanadoo.fr> wrote:
> There is no need to include i2c.h and spi/spi.h in st_sensors.h.
> Should it be needed, st_sensors_(i2c|spi).h should be used.
Agreed these should be dropped from here.
But I don't agree with statement that i2c.h and spi/spi.h should
be gotten implicitly from st_sensors_i2c.h / st_sensors_spi.h
If they are needed the should be included directly in the files
where they are needed.
Jonathan
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> Based on one of my script, this reduces the number of included files from
> 573 files to 515 files when compiling drivers/iio/accel/st_accel_buffer.c
> ---
> include/linux/iio/common/st_sensors.h | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/include/linux/iio/common/st_sensors.h b/include/linux/iio/common/st_sensors.h
> index 607c3a89a647..a1d3d57d6d6e 100644
> --- a/include/linux/iio/common/st_sensors.h
> +++ b/include/linux/iio/common/st_sensors.h
> @@ -10,8 +10,6 @@
> #ifndef ST_SENSORS_H
> #define ST_SENSORS_H
>
> -#include <linux/i2c.h>
> -#include <linux/spi/spi.h>
> #include <linux/irqreturn.h>
> #include <linux/iio/iio.h>
> #include <linux/iio/trigger.h>
next prev parent reply other threads:[~2023-06-17 18:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-12 20:13 [PATCH 1/2] iio: st_sensors: Remove some redundant includes Christophe JAILLET
2023-06-12 20:13 ` [PATCH 2/2] iio: st_sensors: Remove some redundant includes in st_sensors.h Christophe JAILLET
2023-06-17 18:49 ` Jonathan Cameron [this message]
2023-06-19 20:02 ` Christophe JAILLET
2023-07-02 10:31 ` Jonathan Cameron
2023-06-17 18:47 ` [PATCH 1/2] iio: st_sensors: Remove some redundant includes 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=20230617194911.7963bd6d@jic23-huawei \
--to=jic23@kernel.org \
--cc=christophe.jaillet@wanadoo.fr \
--cc=kernel-janitors@vger.kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox