tracing: Remove logic for registering multiple event triggers at a time
authorTom Zanussi <zanussi@kernel.org>
Fri, 4 Feb 2022 22:12:04 +0000 (16:12 -0600)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Tue, 26 Apr 2022 21:58:50 +0000 (17:58 -0400)
commitb8cc44a4d3c19296dfd1be1a018a8523e09ab919
treed6a5b031585b5eb484746f12bdaa732a30a5d12c
parent217d8c05ec6295947b0b71bc784012d112f0032e
tracing: Remove logic for registering multiple event triggers at a time

Code for registering triggers assumes it's possible to register more
than one trigger at a time.  In fact, it's unimplemented and there
doesn't seem to be a reason to do that.

Remove the n_registered param from event_trigger_register() and fix up
callers.

Doing so simplifies the logic in event_trigger_register to the point
that it just becomes a wrapper calling event_command.reg().

It also removes the problematic call to event_command.unreg() in case
of failure.  A new function, event_trigger_unregister() is also added
for callers to call themselves.

The changes to trace_events_hist.c simply allow compilation; a
separate patch follows which updates the hist triggers to work
correctly with the new changes.

Link: https://lkml.kernel.org/r/6149fec7a139d93e84fa4535672fb5bef88006b0.1644010575.git.zanussi@kernel.org
Signed-off-by: Tom Zanussi <zanussi@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
kernel/trace/trace.h
kernel/trace/trace_events_hist.c
kernel/trace/trace_events_trigger.c