[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180110164616.1465096-1-arnd@arndb.de>
Date: Wed, 10 Jan 2018 17:45:54 +0100
From: Arnd Bergmann <arnd@...db.de>
To: Tony Luck <tony.luck@...el.com>, Borislav Petkov <bp@...en8.de>
Cc: Arnd Bergmann <arnd@...db.de>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
Yazen Ghannam <yazen.ghannam@....com>,
Xunlei Pang <xlpang@...hat.com>, linux-edac@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] x86: mce: fix type mismatch warning
The printed symbol is a 64-bit address, so we get a warning when
building this code for 32-bit kernels:
arch/x86/kernel/cpu/mcheck/mce.c: In function '__print_mce':
arch/x86/kernel/cpu/mcheck/mce.c:237:21: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
This uses an extra uintptr_t cast to avoid the warning.
Fixes: 7b6061627eb8 ("x86: do not use print_symbol()")
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
arch/x86/kernel/cpu/mcheck/mce.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index 26ee8c4c9b18..3b2f86c51a98 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -234,7 +234,7 @@ static void __print_mce(struct mce *m)
m->cs, m->ip);
if (m->cs == __KERNEL_CS)
- pr_cont("{%pS}", (void *)m->ip);
+ pr_cont("{%pS}", (void *)(uintptr_t)m->ip);
pr_cont("\n");
}
--
2.9.0
Powered by blists - more mailing lists