* [PATCH v2] ARM: arch/arm/kernel/signal.c: resolve set-but-not-used warning
@ 2026-06-10 4:52 Ethan Nelson-Moore
0 siblings, 0 replies; only message in thread
From: Ethan Nelson-Moore @ 2026-06-10 4:52 UTC (permalink / raw)
To: linux-kernel
Cc: Baruch Siach, Ethan Nelson-Moore, Russell King,
Thomas Weißschuh, Arnd Bergmann
If neither CONFIG_IWMMXT nor CONFIG_VFP are enabled (which is the case,
for example, in rpc_defconfig), the variable "aux" is set but not used,
which generates a warning during W=1 builds. Resolve this issue by
marking the variable with the __maybe_unused attribute.
Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
---
Changes from v1: Use __maybe_unused instead of introducing another layer
of ifdefs (suggested by Baruch Siach)
arch/arm/kernel/signal.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c
index 7be9188d83d9..a7e5e439a735 100644
--- a/arch/arm/kernel/signal.c
+++ b/arch/arm/kernel/signal.c
@@ -140,7 +140,7 @@ static int restore_vfp_context(char __user **auxp)
static int restore_sigframe(struct pt_regs *regs, struct sigframe __user *sf)
{
struct sigcontext context;
- char __user *aux;
+ char __user *aux __maybe_unused;
sigset_t set;
int err;
--
2.43.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-06-10 4:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-10 4:52 [PATCH v2] ARM: arch/arm/kernel/signal.c: resolve set-but-not-used warning Ethan Nelson-Moore
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox