Re: [PATCH 07/22] iio: dac: ad5686: refactor include headers

Andy Shevchenko
2026-04-22T19:43:56Z

On Wed, Apr 22, 2026 at 03:45:41PM +0100, Rodrigo Alencar via B4 Relay wrote:

> Apply IWYU principle, replacing unused/generic headers for
> specific/missing headers. The resulting include directive list is sorted
> accordingly.

...

> -#include "ad5686.h"
> -
> +#include <asm/byteorder.h>

asm/* is another group and goes after linux/* generic ones.

> +#include <linux/array_size.h>
> +#include <linux/err.h>
> +#include <linux/mod_devicetable.h>
> #include <linux/module.h>
> #include <linux/spi/spi.h>
>
> +#include "ad5686.h"

> -#include <linux/interrupt.h>
> -#include <linux/fs.h>
> -#include <linux/device.h>
> +#include <linux/array_size.h>
> +#include <linux/err.h>
> +#include <linux/export.h>
> #include <linux/module.h>
> -#include <linux/kernel.h>
> -#include <linux/slab.h>
> -#include <linux/sysfs.h>
> #include <linux/regulator/consumer.h>

> -
> -#include <linux/iio/iio.h>
> -#include <linux/iio/sysfs.h>

Leave linux/iio/* group separated.

> +#include <linux/sysfs.h>
>
> #include "ad5686.h"

It should be something like this at the end:

linux/* generic headers
blank line
asm/* generic headers
blank line
linux/iio/*
blank line
"private headers"

...

Same applies to the rest of the patch.

--
With Best Regards,
Andy Shevchenko