Re: [PATCH] iio: mapping file for include-what-you-use tool
From: Andy Shevchenko
Date: Tue May 12 2026 - 04:07:46 EST
On Tue, May 12, 2026 at 10:04:51AM +0200, Joshua Crofts wrote:
> On Tue, 12 May 2026 at 10:00, Andy Shevchenko
> <andriy.shevchenko@xxxxxxxxx> wrote:
> >
> > On Tue, May 12, 2026 at 07:35:05AM +0000, Joshua Crofts wrote:
> > > As promised, I'm sending my IWYU mapping file, based on Jonathan's
> > > version with a few additional tweaks by me.
> >
> > Please, also add a link to Jonathan's version.
>
> Good point, forgot to do that.
> > > Other than adding support for more assembly file business, I've also
> > > experimented with individual symbol definition (see BIT() and GENMASK()
> > > in the following file) - this is to prevent issues such as the tool
> > > wanting you to include <linux/bits.h> when you already have
> > > <linux/bitops.h> in the source file (I agree, doing this symbol by
> > > symbol is tedious, but BIT() and GENMASK() are symbols that especially
> > > do this, and they're included in most, if not all drivers).
> > >
> > > Feel free to improve this file and pass it on. I wouldn't really fully
> > > rely on IWYU as even with the mapping file the results can be weird,
> > > but it definitely serves as a good starting point when doing driver
> > > cleanup.
> > >
> > > I'm making this patch an RFC - this is not intended for merging.
...
> > > + { "include": ["\"vdso/bits.h\"", "private", "<linux/bits.h>", "public"] },
> > > + { "include": ["\"vdso/ktime.h\"", "private", "<linux/ktime.h>", "public"] },
> > > + { "include": ["\"vdso/limits.h\"", "private", "<linux/limits.h>", "public"] },
> > > + { "include": ["\"vdso/time64.h\"", "private", "<linux/time64.h>", "public"] },
> >
> > > +
> >
> > Trailing whitespaces.
>
> Well, considering this is not intended to be an actual patch...
Still better to follow the common style.
--
With Best Regards,
Andy Shevchenko