Skip to content

Commit

Permalink
tracing/trace_stack: Cleanup for trace_lookup_stack()
Browse files Browse the repository at this point in the history
We can directly use %pF input format instead of sprint_symbol()
and %s input format.

Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Reviewed-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
  • Loading branch information
Xiao Guangrong authored and Frederic Weisbecker committed Jul 17, 2009
1 parent 64fbcd1 commit 79173bf
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions kernel/trace/trace_stack.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
unsigned long addr = stack_dump_trace[i];
#ifdef CONFIG_KALLSYMS
char str[KSYM_SYMBOL_LEN];

sprint_symbol(str, addr);

return seq_printf(m, "%s\n", str);
#else
return seq_printf(m, "%p\n", (void*)addr);
#endif
return seq_printf(m, "%pF\n", (void *)addr);
}

static void print_disabled(struct seq_file *m)
Expand Down

0 comments on commit 79173bf

Please sign in to comment.