OSDN Git Service

arc: do not use __print_symbol()
authorSergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Mon, 11 Dec 2017 12:50:25 +0000 (21:50 +0900)
committerVineet Gupta <vgupta@synopsys.com>
Wed, 20 Dec 2017 20:41:43 +0000 (12:41 -0800)
__print_symbol() uses extra stack space to sprintf() symbol
information and then to feed that buffer to printk()

  char buffer[KSYM_SYMBOL_LEN];

  sprint_symbol(buffer, address);
  printk(fmt, buffer);

Replace __print_symbol() with a direct printk("%pS") call.

Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
arch/arc/kernel/stacktrace.c

index 74315f3..bf40e06 100644 (file)
@@ -163,7 +163,7 @@ arc_unwind_core(struct task_struct *tsk, struct pt_regs *regs,
  */
 static int __print_sym(unsigned int address, void *unused)
 {
-       __print_symbol("  %s\n", address);
+       printk("  %pS\n", (void *)address);
        return 0;
 }