Re: [PATCH v2] iio: adc: ad7476: Remove duplicate include and sort the rest
From: Andy Shevchenko
Date: Thu Jan 08 2026 - 06:10:06 EST
On Thu, Jan 8, 2026 at 10:41 AM Chen Ni <nichen@xxxxxxxxxxx> wrote:
>
> Remove duplicate <linux/bitops.h> and sort all headers alphabetically.
I'm okay with this change, but I think ideally it would be three
patches in a series:
patch 1) as your v1;
patch 2) sorting the headers (as here);
patch 3) getting rid of "proxy" headers, e.g. kernel.h, by replacing
them with what actually is being used.
> #include <linux/bitops.h>
> +#include <linux/delay.h>
> #include <linux/device.h>
^^^ needs to be checked if it's used as a "proxy"
> +#include <linux/err.h>
> +#include <linux/gpio/consumer.h>
> #include <linux/kernel.h>
^^^ This is for sure not used as is in the driver, so definitely has
to be replaced.
> +#include <linux/module.h>
> +#include <linux/regulator/consumer.h>
> #include <linux/slab.h>
> -#include <linux/sysfs.h>
> #include <linux/spi/spi.h>
> -#include <linux/regulator/consumer.h>
> -#include <linux/gpio/consumer.h>
> -#include <linux/err.h>
> -#include <linux/module.h>
> -#include <linux/bitops.h>
> -#include <linux/delay.h>
> +#include <linux/sysfs.h>
It's up to the maintainers and to you to resplit, send a v3, but
again, I'm fine with this version.
--
With Best Regards,
Andy Shevchenko