Re: [PATCH 0/2] powerpc/sstep: Fix compilation on 32-bit PowerPC
From: Link Mauve
Date: Thu Jul 30 2026 - 02:10:29 EST
On Thu, Jul 30, 2026 at 07:51:40AM +0200, Christophe Leroy (CS GROUP) wrote:
>
>
> Le 29/07/2026 à 22:49, Link Mauve a écrit :
> > Two local variables were only set but never read on 32-bit PowerPC,
> > which causes an error during compilation.
>
> Are those errors new ? This series and the one from yesterday on ppc64, I
> have the feeling that the code is not new. Has anything changed in the
> building flags or does this pops up with recent versions of GCC ? If it is
> the case it is worth saying it in the commit messages in order to clarify
> the reason for the fix.
I think they started happening when I enabled Rust support, but I’ve
been doing that for quite a while and I don’t know if the two are
linked, and when I disable CONFIG_RUST it’s still erroring without this
series.
I’m pretty sure someone has built the kernel on 32-bit PowerPC since
650b55b707fdfa764e9f2b81314d3eb4216fb962 or
930d6288a26787d2e7f633705434171a506db9c5, both commits introducing the
two variables which are then never used.
I couldn’t follow the maze of Makefile enough to determine where
-Werror=unused-but-set-variable is set, if this is specific to recent
versions of gcc or not, if this is enabled by a different CONFIG_
option, if this could be disabled already. But I believe fixing this
issue is good anyway, the compiler is right that without __powerpc64__
these two variables are never used.
>
> >
> > This series first makes the 64-bit guards consistent by converting all
> > uses of CONFIG_PPC64 to use __powerpc64__ instead, and then guard the
> > two variables rc and suffix behind __powerpc64__ checks.
> >
> > Link Mauve (2):
> > powerpc/sstep: Consistently use one define to check arch bit width
> > powerpc/sstep: Don’t define variables we won’t be using
> >
> > arch/powerpc/lib/sstep.c | 26 ++++++++++++++++----------
> > 1 file changed, 16 insertions(+), 10 deletions(-)
> >
> >
> > base-commit: 78bc8af4affb9a732504eb22eeac7d1e50883853
>
--
Link Mauve