[PATCH] arm64/fpsimd: hide unused sve_to_fpsimd() function

Arnd Bergmann arnd at kernel.org
Sat May 3 07:05:10 PDT 2025


From: Arnd Bergmann <arnd at arndb.de>

The one caller outside of an #ifdef was removed:

arch/arm64/kernel/fpsimd.c:676:13: error: 'sve_to_fpsimd' defined but not used [-Werror=unused-function]
  676 | static void sve_to_fpsimd(struct task_struct *task)
      |             ^~~~~~~~~~~~~

Add annother #ifdef around the definition.

Fixes: 929fa99b1215 ("arm64/fpsimd: signal: Always save+flush state early")
Signed-off-by: Arnd Bergmann <arnd at arndb.de>
---
 arch/arm64/kernel/fpsimd.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kernel/fpsimd.c
index 92c1f647fef8..be8cb5b550a4 100644
--- a/arch/arm64/kernel/fpsimd.c
+++ b/arch/arm64/kernel/fpsimd.c
@@ -662,6 +662,7 @@ static void fpsimd_to_sve(struct task_struct *task)
 	__fpsimd_to_sve(sst, fst, vq);
 }
 
+#ifdef CONFIG_ARM64_SVE
 /*
  * Transfer the SVE state in task->thread.sve_state to
  * task->thread.uw.fpsimd_state.
@@ -691,6 +692,7 @@ static void sve_to_fpsimd(struct task_struct *task)
 		fst->vregs[i] = arm64_le128_to_cpu(*p);
 	}
 }
+#endif
 
 void cpu_enable_fpmr(const struct arm64_cpu_capabilities *__always_unused p)
 {
-- 
2.39.5




More information about the linux-arm-kernel mailing list