Re: [PATCH v4 03/11] iio: amplifiers: ad8366: remove unused include headers
From: Jonathan Cameron
Date: Sun Feb 15 2026 - 11:03:29 EST
On Sun, 15 Feb 2026 09:31:08 +0200
Andy Shevchenko <andriy.shevchenko@xxxxxxxxx> 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@xxxxxxxxx> 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 :(