Skip to content

Commit

Permalink
tracing: Fix return of trace_dump_stack()
Browse files Browse the repository at this point in the history
The trace_dump_stack() returned a value for a void function.

Also, added the missing stub for trace_dump_stack() when tracing is
not configured.

Reported-by: Ingo Molnar <mingo@elte.hu>
LKML-Reference: <20091214162713.GA31060@elte.hu>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Steven Rostedt authored and Ingo Molnar committed Dec 15, 2009
1 parent 0087aab commit e36c545
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions include/linux/kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,7 @@ trace_printk(const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
static inline void tracing_start(void) { }
static inline void tracing_stop(void) { }
static inline void ftrace_off_permanent(void) { }
static inline void trace_dump_stack(void) { }
static inline int
trace_printk(const char *fmt, ...)
{
Expand Down
2 changes: 1 addition & 1 deletion kernel/trace/trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -1158,7 +1158,7 @@ void trace_dump_stack(void)
unsigned long flags;

if (tracing_disabled || tracing_selftest_running)
return 0;
return;

local_save_flags(flags);

Expand Down

0 comments on commit e36c545

Please sign in to comment.