Skip to content

Commit db5e7ec

Browse files
Steven Rostedtrostedt
authored andcommitted
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 <rostedt@goodmis.org>
1 parent 5cf42f7 commit db5e7ec

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

‎kernel/trace/trace_printk.c‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,13 +240,10 @@ static const char **find_next(void *v, loff_t *pos)
240240
const char **fmt = v;
241241
int start_index;
242242

243-
if (!fmt)
244-
fmt = __start___trace_bprintk_fmt + *pos;
245-
246243
start_index = __stop___trace_bprintk_fmt - __start___trace_bprintk_fmt;
247244

248245
if (*pos < start_index)
249-
return fmt;
246+
return __start___trace_bprintk_fmt + *pos;
250247

251248
return find_next_mod_format(start_index, v, fmt, pos);
252249
}

0 commit comments

Comments
 (0)