[PATCH RESEND 1/2] powerpc/ps3: Drop redundant result assignment

Segher Boessenkool segher at kernel.crashing.org
Wed Mar 18 22:51:24 AEDT 2026


On Tue, Mar 17, 2026 at 02:08:24PM +0100, Krzysztof Kozlowski wrote:
> Return value of ps3_start_probe_thread() is not used, so code can be
> simplified to fix W=1 clang warnings:
> 
>   arch/powerpc/platforms/ps3/device-init.c:953:6: error: variable 'result' set but not used [-Werror,-Wunused-but-set-variable]

And this is exactly why -Werror is harmful.  A boring harmless warning
turned into a build break :-(

You can sometimes usefully turn *some* warnings into errors, and any
user is of course free to invite as much pain as he or she wants to
bear, but heaping nonsense like this onto unsuspecting users is just
evil.  And it is even worse when the warnings can change with compiler
version!


Segher


More information about the Linuxppc-dev mailing list