Re: [PATCH v4 03/11] iio: amplifiers: ad8366: remove unused include headers

Jonathan Cameron
2026-02-15T16:03:14Z

On Sun, 15 Feb 2026 09:31:08 +0200
Andy Shevchenko <andriy.shevchenko@intel.com> wrote:

> On Sat, Feb 14, 2026 at 06:30:51PM +0000, Jonathan Cameron wrote:
> > On Wed, 11 Feb 2026 15:35:32 +0200
> > Andy Shevchenko <andriy.shevchenko@intel.com> wrote:
> > > On Wed, Feb 11, 2026 at 12:55:30PM +0000, Rodrigo Alencar wrote:
> > > > On 26/02/10 09:57PM, Andy Shevchenko wrote:
> > > > > On Tue, Feb 10, 2026 at 07:42:03PM +0000, Rodrigo Alencar via B4 Relay wrote:
>
> ...
>
> > > > > Yeah, but it also means to add (a lot of) missed headers...
> > > > >
> > > > > array_size,h
> > > > > dev_printk.h
> > > > > mod_devicetable.h
> > > > > mutex.h
> > > > > stddef.h
>
> ...
>
> > > > This is the output of the iwyu tool without this patch series:
> > >
> > > Have you applied the configuration Jonathan made for this tool in relation
> > > to the Linux kernel project? By default the tool has a lot of noise, indeed.
> >
> > Worth noting that I'm still evolving my config and suspect there will still
> > be a bit of 'taste' applied to the output even once I conclude what the
> > best combinations are. So to give my view on the following..
> >
> > > #include <stddef.h> // for NULL
> > Not this one.
>
> Why not? Here is the NULL in use, but...
>
> > > #include "linux/compiler_attributes.h" // for __aligned
> > Never that one, but I sometimes feel compiler.h is fine.
>
> ...taking into account this one, I would rather include linux/types.h
> instead of any of them.
>
That's where I'd go as well. I think this might be the first case
I've seen where there is no other reason to have linux/types.h (due to the
sub 8 bits bit depth and use of unsigned chars rather than u8) so
I kind of assumed it was there :(