Re: [PATCH v2] iio: adc: spear_adc: cleans up, update and sorts the existing includes
From: Andy Shevchenko
Date: Sat Dec 06 2025 - 12:55:53 EST
On Sat, Dec 6, 2025 at 3:21 PM Rodrigo Gobbi <rodrigo.gobbi.7@xxxxxxxxx> wrote:
>
> Remove unused includes and add what is being used (IWYU principle) and
> sort the remaining ones.
...
> +#include <linux/array_size.h>
> #include <linux/bitfield.h>
> +#include <linux/bits.h>
> #include <linux/clk.h>
> +#include <linux/compiler_types.h>
It's rare that we include this low-level header in the driver's C
code. Usually we do include types.h. Also types.h is missing for uXX
in the code. Also types.h brings NULL definition from stddef.h and we,
for now, consider that it's guaranteed inclusion, so we don't add
stddef.h explicitly in such cases.
> #include <linux/completion.h>
> +#include <linux/dev_printk.h>
> +#include <linux/err.h>
> +#include <linux/interrupt.h>
> +#include <linux/io.h>
> +#include <linux/math.h>
> +#include <linux/module.h>
> +#include <linux/mod_devicetable.h>
> +#include <linux/mutex.h>
> +#include <linux/of.h>
Jonathan already said about this one.
> +#include <linux/platform_device.h>
> +#include <linux/property.h>
--
With Best Regards,
Andy Shevchenko