From: Qian Cai <cai@lca.pw>
To: mingo@redhat.com, tglx@linutronix.de, bp@alien8.de
Cc: dave.hansen@linux.intel.com, luto@kernel.org,
peterz@infradead.org, hpa@zytor.com, x86@kernel.org,
linux-kernel@vger.kernel.org, Qian Cai <cai@lca.pw>
Subject: [PATCH] x86/mm: fix an unused variable "tsk" warning
Date: Fri, 31 May 2019 16:38:26 -0400 [thread overview]
Message-ID: <1559335106-3239-1-git-send-email-cai@lca.pw> (raw)
"tsk" is only used when MEMORY_FAILURE=y.
arch/x86/mm/fault.c: In function 'do_sigbus':
arch/x86/mm/fault.c:1017:22: warning: unused variable 'tsk'
[-Wunused-variable]
Signed-off-by: Qian Cai <cai@lca.pw>
---
arch/x86/mm/fault.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
index 46df4c6aae46..a10e518dcdf8 100644
--- a/arch/x86/mm/fault.c
+++ b/arch/x86/mm/fault.c
@@ -1015,7 +1015,9 @@ static inline bool bad_area_access_from_pkeys(unsigned long error_code,
do_sigbus(struct pt_regs *regs, unsigned long error_code, unsigned long address,
vm_fault_t fault)
{
+#ifdef CONFIG_MEMORY_FAILURE
struct task_struct *tsk = current;
+#endif
/* Kernel mode? Handle exceptions or die: */
if (!(error_code & X86_PF_USER)) {
--
1.8.3.1
next reply other threads:[~2019-05-31 20:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-31 20:38 Qian Cai [this message]
2019-05-31 20:53 ` Dave Hansen
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=1559335106-3239-1-git-send-email-cai@lca.pw \
--to=cai@lca.pw \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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
all inboxes | Powered by JetHome®