tracing histograms: Simplify parse_actions() function
authorSteven Rostedt (Google) <rostedt@goodmis.org>
Mon, 8 Jan 2024 01:32:58 +0000 (20:32 -0500)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Mon, 8 Jan 2024 18:24:56 +0000 (13:24 -0500)
commit4f1991a92cfe89096b2d1f5583a2e093bdd55c37
tree9c4d71bc85ebea44efa0ce6c906441ca045d9f1a
parent26547691107eda45b0f20ee79bad19bbe5fcbfd7
tracing histograms: Simplify parse_actions() function

The parse_actions() function uses 'len = str_has_prefix()' to test which
action is in the string being parsed. But then it goes and repeats the
logic for each different action. This logic can be simplified and
duplicate code can be removed as 'len' contains the length of the found
prefix which should be used for all actions.

Link: https://lore.kernel.org/all/20240107112044.6702cb66@gandalf.local.home/
Link: https://lore.kernel.org/linux-trace-kernel/20240107203258.37e26d2b@gandalf.local.home
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Andy Shevchenko <andy@kernel.org>
Cc: Tom Zanussi <zanussi@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
kernel/trace/trace_events_hist.c