Skip to content

Commit

Permalink
tracing: Fix regression in printk_formats file
Browse files Browse the repository at this point in the history
The fix to fix the printk_formats of modules broke the
printk_formats of trace_printks in the kernel.

The update of what to show via the seq_file was only updated
if the passed in fmt was NULL, which happens only on the first
iteration. The result was showing the first format every time
instead of iterating through the available formats.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
  • Loading branch information
Steven Rostedt authored and rostedt committed Jun 9, 2011
1 parent 5cf42f7 commit db5e7ec
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions kernel/trace/trace_printk.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,13 +240,10 @@ static const char **find_next(void *v, loff_t *pos)
const char **fmt = v;
int start_index;

if (!fmt)
fmt = __start___trace_bprintk_fmt + *pos;

start_index = __stop___trace_bprintk_fmt - __start___trace_bprintk_fmt;

if (*pos < start_index)
return fmt;
return __start___trace_bprintk_fmt + *pos;

return find_next_mod_format(start_index, v, fmt, pos);
}
Expand Down

0 comments on commit db5e7ec

Please sign in to comment.