From: Steven Rostedt Date: Thu, 9 Jun 2011 12:40:59 +0000 (-0400) Subject: tracing: Fix regression in printk_formats file X-Git-Tag: v3.12-rc1~5545^2~1^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=db5e7ecc4abc91b9f26f0c0d79ef88a51e987d90;p=kernel%2Fkernel-generic.git tracing: Fix regression in printk_formats file 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 --- diff --git a/kernel/trace/trace_printk.c b/kernel/trace/trace_printk.c index dff763b..1f06468 100644 --- a/kernel/trace/trace_printk.c +++ b/kernel/trace/trace_printk.c @@ -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); }