Re: [PATCH] iio: mapping file for include-what-you-use tool
From: Joshua Crofts
Date: Tue May 12 2026 - 03:38:21 EST
On Tue, 12 May 2026 at 09:35, Joshua Crofts <joshua.crofts1@xxxxxxxxx> wrote:
>
> As promised, I'm sending my IWYU mapping file, based on Jonathan's
> version with a few additional tweaks by me.
>
> 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.
Annnd I forgot to add the RFC tag... Either way, the above still stands.
--
Kind regards
CJD