* x86: mce: fix type mismatch warning
@ 2018-01-10 16:45 Arnd Bergmann
0 siblings, 0 replies; 2+ messages in thread
From: Arnd Bergmann @ 2018-01-10 16:45 UTC (permalink / raw)
To: Tony Luck, Borislav Petkov
Cc: Arnd Bergmann, Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86,
Yazen Ghannam, Xunlei Pang, linux-edac, linux-kernel
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@arndb.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");
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* x86: mce: fix type mismatch warning
@ 2018-01-14 11:52 Thomas Gleixner
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Gleixner @ 2018-01-14 11:52 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Tony Luck, Borislav Petkov, Ingo Molnar, H. Peter Anvin, x86,
Yazen Ghannam, Xunlei Pang, linux-edac, linux-kernel
On Wed, 10 Jan 2018, Arnd Bergmann wrote:
> 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()")
I have no idea where this commit comes from .... It's neither in Linus tree
nor in tip.
Thanks,
tglx
---
To unsubscribe from this list: send the line "unsubscribe linux-edac" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-01-14 11:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-14 11:52 x86: mce: fix type mismatch warning Thomas Gleixner
-- strict thread matches above, loose matches on Subject: below --
2018-01-10 16:45 Arnd Bergmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox