From: Ethan Nelson-Moore <enelsonmoore@gmail.com>
To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org
Cc: "Ethan Nelson-Moore" <enelsonmoore@gmail.com>,
"Russell King" <linux@armlinux.org.uk>,
"Arnd Bergmann" <arnd@arndb.de>,
"Thomas Weißschuh" <thomas.weissschuh@linutronix.de>
Subject: [PATCH] ARM: arch/arm/kernel/signal.c: resolve set-but-not-used warning
Date: Sun, 7 Jun 2026 22:09:24 -0700 [thread overview]
Message-ID: <20260608050926.88446-1-enelsonmoore@gmail.com> (raw)
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 only
defining the variable if it will be used.
Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
---
arch/arm/kernel/signal.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c
index 7be9188d83d9..1d015b696a76 100644
--- a/arch/arm/kernel/signal.c
+++ b/arch/arm/kernel/signal.c
@@ -140,7 +140,9 @@ static int restore_vfp_context(char __user **auxp)
static int restore_sigframe(struct pt_regs *regs, struct sigframe __user *sf)
{
struct sigcontext context;
+#if defined(CONFIG_IWMMXT) || defined(CONFIG_VFP)
char __user *aux;
+#endif
sigset_t set;
int err;
@@ -171,6 +173,7 @@ static int restore_sigframe(struct pt_regs *regs, struct sigframe __user *sf)
err |= !valid_user_regs(regs);
+#if defined(CONFIG_IWMMXT) || defined(CONFIG_VFP)
aux = (char __user *) sf->uc.uc_regspace;
#ifdef CONFIG_IWMMXT
if (err == 0)
@@ -180,6 +183,7 @@ static int restore_sigframe(struct pt_regs *regs, struct sigframe __user *sf)
if (err == 0)
err |= restore_vfp_context(&aux);
#endif
+#endif /* defined(CONFIG_IWMMXT) || defined(CONFIG_VFP) */
return err;
}
--
2.43.0
next reply other threads:[~2026-06-08 5:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-08 5:09 Ethan Nelson-Moore [this message]
2026-06-08 5:29 ` [PATCH] ARM: arch/arm/kernel/signal.c: resolve set-but-not-used warning Arnd Bergmann
2026-06-08 5:36 ` Baruch Siach
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260608050926.88446-1-enelsonmoore@gmail.com \
--to=enelsonmoore@gmail.com \
--cc=arnd@arndb.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=thomas.weissschuh@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox