[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1559335106-3239-1-git-send-email-cai@lca.pw>
Date: Fri, 31 May 2019 16:38:26 -0400
From: Qian Cai <cai@....pw>
To: mingo@...hat.com, tglx@...utronix.de, bp@...en8.de
Cc: dave.hansen@...ux.intel.com, luto@...nel.org, peterz@...radead.org,
hpa@...or.com, x86@...nel.org, linux-kernel@...r.kernel.org,
Qian Cai <cai@....pw>
Subject: [PATCH] x86/mm: fix an unused variable "tsk" warning
"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@....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
Powered by blists - more mailing lists