Skip to content

Commit 7b70ac4

Browse files
glemcorostedt
authored andcommitted
rv: Remove trailing whitespace from tracepoint string
RV event tracepoints print a line with the format: "event_xyz: S0 x event -> S1 " "event_xyz: S1 x event -> S0 (final)" While printing an event leading to a non-final state, the line has a trailing white space (visible above before the closing "). Adapt the format string not to print the trailing whitespace if we are not printing "(final)". Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Tomas Glozar <tglozar@redhat.com> Cc: Juri Lelli <jlelli@redhat.com> Cc: Clark Williams <williams@redhat.com> Cc: John Kacur <jkacur@redhat.com> Link: https://lore.kernel.org/20250728135022.255578-3-gmonaco@redhat.com Reviewed-by: Nam Cao <namcao@linutronix.de> Signed-off-by: Gabriele Monaco <gmonaco@redhat.com> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
1 parent 28a78af commit 7b70ac4

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

kernel/trace/rv/rv_trace.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ DECLARE_EVENT_CLASS(event_da_monitor,
2929
__entry->final_state = final_state;
3030
),
3131

32-
TP_printk("%s x %s -> %s %s",
32+
TP_printk("%s x %s -> %s%s",
3333
__entry->state,
3434
__entry->event,
3535
__entry->next_state,
36-
__entry->final_state ? "(final)" : "")
36+
__entry->final_state ? " (final)" : "")
3737
);
3838

3939
DECLARE_EVENT_CLASS(error_da_monitor,
@@ -90,12 +90,12 @@ DECLARE_EVENT_CLASS(event_da_monitor_id,
9090
__entry->final_state = final_state;
9191
),
9292

93-
TP_printk("%d: %s x %s -> %s %s",
93+
TP_printk("%d: %s x %s -> %s%s",
9494
__entry->id,
9595
__entry->state,
9696
__entry->event,
9797
__entry->next_state,
98-
__entry->final_state ? "(final)" : "")
98+
__entry->final_state ? " (final)" : "")
9999
);
100100

101101
DECLARE_EVENT_CLASS(error_da_monitor_id,

0 commit comments

Comments
 (0)