Skip to content

Commit 7b60616

Browse files
sergey-senozhatskypmladek
authored andcommitted
x86: do not use print_symbol()
print_symbol() is a very old API that has been obsoleted by %pS format specifier in a normal printk() call. Replace print_symbol() with a direct printk("%pS") call and correctly handle continuous lines. Link: http://lkml.kernel.org/r/[email protected] To: Andrew Morton <[email protected]> To: Russell King <[email protected]> To: Catalin Marinas <[email protected]> To: Mark Salter <[email protected]> To: Tony Luck <[email protected]> To: David Howells <[email protected]> To: Yoshinori Sato <[email protected]> To: Guan Xuetao <[email protected]> To: Borislav Petkov <[email protected]> To: Greg Kroah-Hartman <[email protected]> To: Thomas Gleixner <[email protected]> To: Peter Zijlstra <[email protected]> To: Vineet Gupta <[email protected]> To: Fengguang Wu <[email protected]> Cc: Steven Rostedt <[email protected]> Cc: Petr Mladek <[email protected]> Cc: LKML <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Signed-off-by: Sergey Senozhatsky <[email protected]> Acked-by: Borislav Petkov <[email protected]> # mce.c part [[email protected]: updated commit message] Signed-off-by: Petr Mladek <[email protected]>
1 parent cb38002 commit 7b60616

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#include <linux/capability.h>
1515
#include <linux/miscdevice.h>
1616
#include <linux/ratelimit.h>
17-
#include <linux/kallsyms.h>
1817
#include <linux/rcupdate.h>
1918
#include <linux/kobject.h>
2019
#include <linux/uaccess.h>
@@ -235,7 +234,7 @@ static void __print_mce(struct mce *m)
235234
m->cs, m->ip);
236235

237236
if (m->cs == __KERNEL_CS)
238-
print_symbol("{%s}", m->ip);
237+
pr_cont("{%pS}", (void *)m->ip);
239238
pr_cont("\n");
240239
}
241240

arch/x86/mm/mmio-mod.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
#include <linux/slab.h>
3030
#include <linux/uaccess.h>
3131
#include <linux/io.h>
32-
#include <linux/kallsyms.h>
3332
#include <asm/pgtable.h>
3433
#include <linux/mmiotrace.h>
3534
#include <asm/e820/api.h> /* for ISA_START_ADDRESS */
@@ -123,8 +122,8 @@ static void die_kmmio_nesting_error(struct pt_regs *regs, unsigned long addr)
123122
pr_emerg("unexpected fault for address: 0x%08lx, last fault for address: 0x%08lx\n",
124123
addr, my_reason->addr);
125124
print_pte(addr);
126-
print_symbol(KERN_EMERG "faulting IP is at %s\n", regs->ip);
127-
print_symbol(KERN_EMERG "last faulting IP was at %s\n", my_reason->ip);
125+
pr_emerg("faulting IP is at %pS\n", (void *)regs->ip);
126+
pr_emerg("last faulting IP was at %pS\n", (void *)my_reason->ip);
128127
#ifdef __i386__
129128
pr_emerg("eax: %08lx ebx: %08lx ecx: %08lx edx: %08lx\n",
130129
regs->ax, regs->bx, regs->cx, regs->dx);

0 commit comments

Comments
 (0)