Re: linux-next: build warnings after merge of the origin tree

From: Linus Torvalds
Date: Mon Jul 29 2024 - 19:58:13 EST


On Mon, 29 Jul 2024 at 16:38, Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> Does anybody have a clue-bat: what makes only the powerpc build show
> this valid warning?

The obvious fix to just remove the stale static variables has been pushed out.

And it turns out I see the failure too, if I use clang.

Interestingly, clang did *not* complain about the

static DEFINE_MUTEX(profile_flip_mutex);

only about the static DEFINE_PER_CPU() cases.

So it looks like having an initializer ends up suppressing the
message, probably due to various historical usage patterns (eg things
like

static char *rcsid="$Id...";

which is a common traditional pattern).

I have the same gcc version on both arm64 and x86-64, so I guess it
could also be some gcc version dependency that caused me to not see
it.

Linus