lkml.org 
[lkml]   [2020]   [May]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[tip: x86/entry] x86/entry: Fix allnoconfig build warning
The following commit has been merged into the x86/entry branch of tip:

Commit-ID: d121f9483b18c423037ce6088feba24ae83891d1
Gitweb: https://git.kernel.org/tip/d121f9483b18c423037ce6088feba24ae83891d1
Author: Ingo Molnar <mingo@kernel.org>
AuthorDate: Mon, 25 May 2020 09:42:41 +02:00
Committer: Ingo Molnar <mingo@kernel.org>
CommitterDate: Mon, 25 May 2020 09:45:27 +02:00

x86/entry: Fix allnoconfig build warning

The following commit:

095b7a3e7745 ("x86/entry: Convert double fault exception to IDTENTRY_DF")

introduced a new build warning on 64-bit allnoconfig kernels, that have CONFIG_VMAP_STACK disabled:

arch/x86/kernel/traps.c:332:16: warning: unused variable ‘address’ [-Wunused-variable]

This variable is only used if CONFIG_VMAP_STACK is defined, so make it
dependent on that, not CONFIG_X86_64.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Alexandre Chartre <alexandre.chartre@oracle.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
---
arch/x86/kernel/traps.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
index 35298c1..9e5d81c 100644
--- a/arch/x86/kernel/traps.c
+++ b/arch/x86/kernel/traps.c
@@ -328,7 +328,7 @@ DEFINE_IDTENTRY_DF(exc_double_fault)
static const char str[] = "double fault";
struct task_struct *tsk = current;

-#ifdef CONFIG_X86_64
+#ifdef CONFIG_VMAP_STACK
unsigned long address = read_cr2();
#endif

\
 
 \ /
  Last update: 2020-05-25 09:53    [W:0.035 / U:0.380 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site