diff options
author | Xiao Guangrong <xiaoguangrong@cn.fujitsu.com> | 2009-07-16 02:17:11 -0400 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2009-07-17 01:44:10 -0400 |
commit | 79173bf556417a737e9d2e096e0788452ec30a61 (patch) | |
tree | c27a263ce2efae15ad7b045f60cd28a0b2390862 /kernel/trace/trace_stack.c | |
parent | 64fbcd162819bddaf0d99e78b16371b655aa5dee (diff) |
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: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Reviewed-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Diffstat (limited to 'kernel/trace/trace_stack.c')
-rw-r--r-- | kernel/trace/trace_stack.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/kernel/trace/trace_stack.c b/kernel/trace/trace_stack.c index e644af910124..a4dc8d9ad1b1 100644 --- a/kernel/trace/trace_stack.c +++ b/kernel/trace/trace_stack.c | |||
@@ -234,15 +234,8 @@ static void t_stop(struct seq_file *m, void *p) | |||
234 | static int trace_lookup_stack(struct seq_file *m, long i) | 234 | static int trace_lookup_stack(struct seq_file *m, long i) |
235 | { | 235 | { |
236 | unsigned long addr = stack_dump_trace[i]; | 236 | unsigned long addr = stack_dump_trace[i]; |
237 | #ifdef CONFIG_KALLSYMS | ||
238 | char str[KSYM_SYMBOL_LEN]; | ||
239 | 237 | ||
240 | sprint_symbol(str, addr); | 238 | return seq_printf(m, "%pF\n", (void *)addr); |
241 | |||
242 | return seq_printf(m, "%s\n", str); | ||
243 | #else | ||
244 | return seq_printf(m, "%p\n", (void*)addr); | ||
245 | #endif | ||
246 | } | 239 | } |
247 | 240 | ||
248 | static void print_disabled(struct seq_file *m) | 241 | static void print_disabled(struct seq_file *m) |