Skip to content

Commit

Permalink
dyndbg: use seq_putc() in ddebug_proc_show()
Browse files Browse the repository at this point in the history
Single characters should be put into a sequence.  Thus use the
corresponding function "seq_putc".

This issue was transformed by using the Coccinelle software.

Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Markus Elfring <[email protected]>
Cc: Jason Baron <[email protected]>
Cc: Jim Cromie <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
  • Loading branch information
elfring authored and akpm00 committed Sep 2, 2024
1 parent 0833952 commit 7b76689
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/dynamic_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -1147,7 +1147,7 @@ static int ddebug_proc_show(struct seq_file *m, void *p)
iter->table->mod_name, dp->function,
ddebug_describe_flags(dp->flags, &flags));
seq_escape_str(m, dp->format, ESCAPE_SPACE, "\t\r\n\"");
seq_puts(m, "\"");
seq_putc(m, '"');

if (dp->class_id != _DPRINTK_CLASS_DFLT) {
class = ddebug_class_name(iter, dp);
Expand All @@ -1156,7 +1156,7 @@ static int ddebug_proc_show(struct seq_file *m, void *p)
else
seq_printf(m, " class unknown, _id:%d", dp->class_id);
}
seq_puts(m, "\n");
seq_putc(m, '\n');

return 0;
}
Expand Down

0 comments on commit 7b76689

Please sign in to comment.