Commit 79173bf5 authored by Xiao Guangrong's avatar Xiao Guangrong Committed by Frederic Weisbecker

tracing/trace_stack: Cleanup for trace_lookup_stack()

We can directly use %pF input format instead of sprint_symbol()
and %s input format.
Signed-off-by: default avatarXiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Reviewed-by: default avatarLi Zefan <lizf@cn.fujitsu.com>
Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
parent 64fbcd16
...@@ -234,15 +234,8 @@ static void t_stop(struct seq_file *m, void *p) ...@@ -234,15 +234,8 @@ static void t_stop(struct seq_file *m, void *p)
static int trace_lookup_stack(struct seq_file *m, long i) static int trace_lookup_stack(struct seq_file *m, long i)
{ {
unsigned long addr = stack_dump_trace[i]; unsigned long addr = stack_dump_trace[i];
#ifdef CONFIG_KALLSYMS
char str[KSYM_SYMBOL_LEN];
sprint_symbol(str, addr); return seq_printf(m, "%pF\n", (void *)addr);
return seq_printf(m, "%s\n", str);
#else
return seq_printf(m, "%p\n", (void*)addr);
#endif
} }
static void print_disabled(struct seq_file *m) static void print_disabled(struct seq_file *m)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment