Re: [PATCH v3 1/2] iio: frequency: ad9832: remove kernel.h proxy header.

Andy Shevchenko
2026-04-14T11:43:32Z

On Tue, Apr 14, 2026 at 12:12:02PM +0200, Joshua Crofts wrote:
> On Tue, 14 Apr 2026 at 11:38, Andy Shevchenko
> <andriy.shevchenko@intel.com> wrote:

...

> > > #include <linux/device.h>
> >
> > What about this one? Is it used?
> >
> > Many drivers just need dev_printk.h + device/devres.h. Some indeed require
> > device.h. Please, double check.
>
> I compiled it with the include combination above and it passed, but looking into
> the generated .i file I can see a full struct device definition, so I
> assume there's
> some sort of transitive include behavior (spi.h or something)

Please, avoid following the suggestions blindly. This work needs a careful
check of what's exactly is being used and which header should provide the
necessary information. While it may compile it might be still wrong. You
need to (briefly) read the code in full. I don't use iwyu tool with tweaks
by Jonathan Cameron, old school guy, but you can also try it [1].

[1]: https://lore.kernel.org/linux-iio/20250629183649.184479-1-jic23@kernel.org/
Read the whole thread, it's not big.

--
With Best Regards,
Andy Shevchenko