Re: [PATCH] lib/string: shrink lib/string.i via IWYU

Andy Shevchenko
2023-12-07T12:51:00Z

On Tue, Dec 05, 2023 at 02:14:55PM -0800, Nick Desaulniers wrote:
> On Tue, Dec 5, 2023 at 1:59 PM Greg KH <greg@kroah.com> wrote:

...

> For example, lib/math/int_log.c includes asm/bug.h. Is that a case
> where lib/math/int_log.c should be #include 'ing linux/bug.h rather
> than asm/bug.h?

For the C-files it's fine to include linux/* versions of asm/* ones,
for the _headers_ I would prefer to be strictly minimalistic, because
of possible header dependency hell. If something is defined in asm/*
and some header wants to use that, it's better to include asm/*.

--
With Best Regards,
Andy Shevchenko