Skip to content

Commit c80c5ec

Browse files
suryasaimadhuIngo Molnar
authored andcommitted
x86/MCE: Fix build warning introduced by "x86: do not use print_symbol()"
The following commit: 7b60616 ("x86: do not use print_symbol()") ... introduced a new build warning on 32-bit x86: arch/x86/kernel/cpu/mcheck/mce.c:237:21: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] pr_cont("{%pS}", (void *)m->ip); ^ Fix the type mismatch between the 'void *' expected by %pS and the mce->ip field which is u64 by casting to long. Signed-off-by: Borislav Petkov <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Sergey Senozhatsky <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Tony Luck <[email protected]> Cc: [email protected] Fixes: 7b60616 ("x86: do not use print_symbol()") Link: http://lkml.kernel.org/r/[email protected] [ Cleaned up the changelog. ] Signed-off-by: Ingo Molnar <[email protected]>
1 parent 7980033 commit c80c5ec

File tree

1 file changed

+1
-1
lines changed
  • arch/x86/kernel/cpu/mcheck

1 file changed

+1
-1
lines changed

arch/x86/kernel/cpu/mcheck/mce.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ static void __print_mce(struct mce *m)
234234
m->cs, m->ip);
235235

236236
if (m->cs == __KERNEL_CS)
237-
pr_cont("{%pS}", (void *)m->ip);
237+
pr_cont("{%pS}", (void *)(unsigned long)m->ip);
238238
pr_cont("\n");
239239
}
240240

0 commit comments

Comments
 (0)