On Fri, Mar 26, 2021 at 07:03:47PM +0200, Andy Shevchenko wrote:
> The bitmap.h header is used in a lot of code around the kernel.
> Besides that it includes kernel.h which sometimes makes a loop.

How much of the kernel does *not* end up pulling kernel.h anyway,
making all subsequent includes fast no-ops?

Realistically, any C compiler is going to recognize the case when
included file has contents of form

#ifndef <pp-id>
#define <pp-id> <possibly empty sequence of preprocessor tokens>
<lines>
#endif

where <lines> contain no exposed #else, #elif or #endif and
remember that subsequent includes of that file should be ignored
unless <pp-id> becomes undefined.

AFAICS, on e.g. allmodconfig amd64 build it's (at most - there
might've been false positives) 131 files out of ~30000; on
defconfig it's 55 out of ~2300.  How much does your patch
change that?

Reply via email to