* [PATCH] trace/hwlat: remove extra space at the end of hwlat_detector/mode
@ 2023-08-25 10:34 Mikhail Kobuk
2023-08-25 12:53 ` Daniel Bristot de Oliveira
0 siblings, 1 reply; 2+ messages in thread
From: Mikhail Kobuk @ 2023-08-25 10:34 UTC (permalink / raw)
To: Steven Rostedt
Cc: Mikhail Kobuk, Daniel Bristot de Oliveira, Masami Hiramatsu,
linux-kernel, linux-trace-kernel, lvc-project,
Alexey Khoroshilov
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.
Fixes: 8fa826b7344d ("trace/hwlat: Implement the mode config option")
Signed-off-by: Mikhail Kobuk <m.kobuk@ispras.ru>
Reviewed-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
---
kernel/trace/trace_hwlat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/trace/trace_hwlat.c b/kernel/trace/trace_hwlat.c
index 2f37a6e68aa9..b791524a6536 100644
--- a/kernel/trace/trace_hwlat.c
+++ b/kernel/trace/trace_hwlat.c
@@ -635,7 +635,7 @@ static int s_mode_show(struct seq_file *s, void *v)
else
seq_printf(s, "%s", thread_mode_str[mode]);
- if (mode != MODE_MAX)
+ if (mode < MODE_MAX - 1) /* if mode is any but last */
seq_puts(s, " ");
return 0;
--
2.42.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] trace/hwlat: remove extra space at the end of hwlat_detector/mode
2023-08-25 10:34 [PATCH] trace/hwlat: remove extra space at the end of hwlat_detector/mode Mikhail Kobuk
@ 2023-08-25 12:53 ` Daniel Bristot de Oliveira
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Bristot de Oliveira @ 2023-08-25 12:53 UTC (permalink / raw)
To: Mikhail Kobuk, Steven Rostedt
Cc: Masami Hiramatsu, linux-kernel, linux-trace-kernel, lvc-project,
Alexey Khoroshilov
On 8/25/23 12:34, Mikhail Kobuk wrote:
> 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.
>
> Fixes: 8fa826b7344d ("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>
Thanks!
-- Daniel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-08-25 12:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-25 10:34 [PATCH] trace/hwlat: remove extra space at the end of hwlat_detector/mode Mikhail Kobuk
2023-08-25 12:53 ` Daniel Bristot de Oliveira
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®