[PATCH] arm64/fpsimd: Avoid warning when sve_to_fpsimd() is unused

Arnd Bergmann arnd at arndb.de
Sat May 3 08:26:13 PDT 2025


On Sat, May 3, 2025, at 16:52, Mark Rutland wrote:
> On Sat, May 03, 2025 at 04:10:43PM +0200, Arnd Bergmann wrote:
>> On Wed, Apr 30, 2025, at 19:32, Mark Rutland wrote:
>
> Fair, though with W=1 there's an existing issue with sme_free() that no-one has
> complained about:
>
> | [mark at lakrids:~/src/linux]% git clean -qfdx
> | [mark at lakrids:~/src/linux]% usekorg-llvm 19.1.0 make ARCH=arm64 
> LLVM=1 -s defconfig             
> | [mark at lakrids:~/src/linux]% ./scripts/config -d ARM64_SVE             
>              
> | [mark at lakrids:~/src/linux]% usekorg-llvm 19.1.0 make ARCH=arm64 
> LLVM=1 -s W=1 arch/arm64/kernel/fpsimd.o
> | arch/arm64/kernel/fpsimd.c:208:20: warning: unused function 
> 'sme_free' [-Wunused-function]
> |   208 | static inline void sme_free(struct task_struct *t) { }
> |       |                    ^~~~~~~~
> | arch/arm64/kernel/fpsimd.c:676:20: warning: unused function 
> 'sve_to_fpsimd' [-Wunused-function]
> |   676 | static inline void sve_to_fpsimd(struct task_struct *task)
> |       |                    ^~~~~~~~~~~~~
> | 2 warnings generated.
>
> ... so we'd want to do something consistent there (and probably for a
> few related functions).
>
> How important is fixing W=1? I note we have a *tonne* of warnings today;
> so I assume we can punt that to a future cleanup?

There are usually new warnings coming in, while there are developers
chipping away at the existing ones, either doing one warning throughout
the tree, or fixing all warnings in a particular subsystem.

I've spent some time on fixing the -Wunused-const-variable warnings,
and others have done similar patches, so we can hopefully turn that
on by default soon. I haven't looked at the unused inline functions
in a while, so I don't know much there would be to do on this one. 

     Arnd



More information about the linux-arm-kernel mailing list