Re: [PATCH v1 1/4] iio: light: Unshadow error codes in ->store()

Andy Shevchenko <[email protected]>
Newsgroups org.kernel.vger.linux-iio,org.kernel.vger.linux-kernel
Organization Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo
Message-ID <[email protected]>
On Fri, Aug 14, 2026 at 10:25:32AM +0200, Joshua Crofts wrote:
> On Fri, 14 Aug 2026 at 10:16, Andy Shevchenko
> <[email protected]> wrote:
> > On Thu, Aug 13, 2026 at 09:47:00PM -0500, Maxwell Doose wrote:
> > > On Thu Aug 13, 2026 at 3:47 PM CDT
> > > Andy Shevchenko <[email protected]> wrote:
> > > > On Thu, Aug 13, 2026 at 8:52 PM Maxwell Doose <[email protected]> wrote:

...

> > > > Note, that kernel.h shouldn't be there at all, but that is definitely out
> > > > of scope here.
> > >
> > > Makes sense. I wonder if it may be worth doing a patch series removing
> > > all of the kernel.h inclusions in IIO all at once (or maybe some drivers
> > > have a legitimate use for it, but that seems highly unlikely).
> >
> > Yes, for sure! I have simply had no time to do it myself, but I have a low-prio
> > item in my always grown TODO list. So, if you do that, I will really appreciate!
> > But be careful, the actual patches should care about the whole bunch of the
> > inclusions, and not just about kernel.h. This means each driver should be
> > carefully inspected in accordance with the IWYU principles.
> 
> This will be a gruelling task (implementing and reviewing), but perhaps it
> would be easier to do one sensor type at a time instead of the entire
> subsystem.

I would start from the easy cases where kernel.h is just not used at all (not
even as a "proxy" header). Then continue with the rest.

Joshua, note, it's only about the drivers that have explicit kernel.h
inclusion. In general the entire IIO needs to be revisited, indeed.

$ git grep -n -lw linux/kernel.h -- drivers/iio/ | wc -l
234

$ git ls-files | grep ^drivers/iio/.*\.c$ | wc -l
707

-- 
With Best Regards,
Andy Shevchenko
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.