Skip to content

Commit 2cf0dee

Browse files
Mikhail Kobukrostedt
authored andcommitted
tracing: Remove extra space at the end of hwlat_detector/mode
Space is printed after each mode value including the last one: $ echo \"$(sudo cat /sys/kernel/tracing/hwlat_detector/mode)\" "none [round-robin] per-cpu " Found by Linux Verification Center (linuxtesting.org) with SVACE. Link: https://lore.kernel.org/linux-trace-kernel/20230825103432.7750-1-m.kobuk@ispras.ru Cc: Masami Hiramatsu <mhiramat@kernel.org> Fixes: 8fa826b ("trace/hwlat: Implement the mode config option") Signed-off-by: Mikhail Kobuk <m.kobuk@ispras.ru> Reviewed-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Acked-by: Daniel Bristot de Oliveira <bristot@kernel.org> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
1 parent 0e19543 commit 2cf0dee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/trace/trace_hwlat.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ static int s_mode_show(struct seq_file *s, void *v)
635635
else
636636
seq_printf(s, "%s", thread_mode_str[mode]);
637637

638-
if (mode != MODE_MAX)
638+
if (mode < MODE_MAX - 1) /* if mode is any but last */
639639
seq_puts(s, " ");
640640

641641
return 0;

0 commit comments

Comments
 (0)