Linux IIO development
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: rafasales@usp.br
Cc: andy@kernel.org, dlechner@baylibre.com, jic23@kernel.org,
	nuno.sa@analog.com, "Gustavo C. Arakaki" <gustavo.arakaki@usp.br>,
	linux-iio@vger.kernel.org
Subject: Re: [PATCH v3 1/3] iio: light: ltr501: update header inclusions
Date: Fri, 24 Apr 2026 12:27:32 +0300	[thread overview]
Message-ID: <aes3hLTjW3VEzMha@ashevche-desk.local> (raw)
In-Reply-To: <20260422231305.677778-2-rafasales@usp.br>

On Wed, Apr 22, 2026 at 08:12:55PM -0300, rafasales@usp.br wrote:

> Update header inclusions to follow IWYU (Include What You Use)
> principle

Respect English grammar and punctuation.

Also this patch does two things: it sorts headers AND moves to IWYU. Hence this
has to be TWO patches.

...

> -#include <linux/module.h>
> -#include <linux/mod_devicetable.h>
> -#include <linux/i2c.h>
> -#include <linux/err.h>
> +#include <asm/page.h>
> +#include <asm/byteorder.h>

The general rule (independently on the folder of the headers) is that the more
generic header is the earlier it's being included. asm/* are definitely _less_
generic than linux/* ones. But at the same time they are more generic than
linux/iio/* ones for _this_ driver.

> +#include <linux/array_size.h>
> +#include <linux/bitops.h>
>  #include <linux/delay.h>
> +#include <linux/dev_printk.h>
> +#include <linux/device.h>
> +#include <linux/err.h>
> +#include <linux/errno.h>
> +#include <linux/i2c.h>
> +#include <linux/interrupt.h>
> +#include <linux/math.h>
> +#include <linux/mod_devicetable.h>
> +#include <linux/module.h>
> +#include <linux/mutex.h>
> +#include <linux/pm.h>
> +#include <linux/property.h>
>  #include <linux/regmap.h>
>  #include <linux/regulator/consumer.h>
> +#include <linux/sprintf.h>
> +#include <linux/sysfs.h>
> +#include <linux/types.h>
>  
> -#include <linux/iio/iio.h>
> +#include <linux/iio/buffer.h>
>  #include <linux/iio/events.h>
> +#include <linux/iio/iio.h>
>  #include <linux/iio/sysfs.h>
>  #include <linux/iio/trigger_consumer.h>
> -#include <linux/iio/buffer.h>
>  #include <linux/iio/triggered_buffer.h>
> +#include <linux/iio/types.h>

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2026-04-24  9:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-22 23:12 [PATCH v3 0/3] iio: light: ltr501: cleanups and modernizations rafasales
2026-04-22 23:12 ` [PATCH v3 1/3] iio: light: ltr501: update header inclusions rafasales
2026-04-24  9:27   ` Andy Shevchenko [this message]
2026-04-22 23:12 ` [PATCH v3 2/3] iio: light: ltr501: use automatic cleanup of locks rafasales
2026-04-24  9:33   ` Andy Shevchenko
2026-04-24 11:32   ` Jonathan Cameron
2026-04-22 23:12 ` [PATCH v3 3/3] iio: light: ltr501: use `sysfs_emit_at()` for showing scales rafasales
2026-04-24  9:34   ` 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=aes3hLTjW3VEzMha@ashevche-desk.local \
    --to=andriy.shevchenko@intel.com \
    --cc=andy@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=gustavo.arakaki@usp.br \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=rafasales@usp.br \
    /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