Re: [GIT pull] core/urgent for v5.14-rc3

From: Linus Torvalds
Date: Sun Jul 25 2021 - 14:06:41 EST


On Sun, Jul 25, 2021 at 2:23 AM Thomas Gleixner <tglx@xxxxxxxxxxxxx> wrote:
>
> A single update for the boot code to prevent aggressive un-inlining which
> causes a section mismatch.

Argh, I did my usual allmodconfig build tests and this looked clean,
and I've already pushed it out.

But I do my clang builds separately, and that showed the bug:

> -static inline void idle_init(unsigned int cpu)
> +static inline void __always_inline idle_init(unsigned int cpu)

Yeah, that's a bit too many "inline"s, and clang quite reasonably
warns about it:

kernel/smpboot.c:50:20: warning: duplicate 'inline' declaration
specifier [-Wduplicate-decl-specifier]

Plus now that I look at it, it also has that __always_inline misplaced
- we should put things like "static" and "inline" (and
"__always_inline") before the function type specifiers.

So that function definition _should_ have been

static __always_inline void idle_init(unsigned int cpu)

instead.

Oh well. I'll fix it up as a separate patch. I wish I had done the
clang build before pushing it out - and I wish the -tip tree started
tested clang as well at least in _some_ configuration.

Linus