On Mon, 16 Aug 2021 23:42:57 -0400 Steven Rostedt <rostedt@xxxxxxxxxxx> wrote: > From: "Steven Rostedt (VMware)" <rostedt@xxxxxxxxxxx> > > As dynamic events are not created by modules, if something is attached to > one, calling "try_module_get()" on its "mod" field, is not going to keep > the dynamic event from going away. > > Since dynamic events do not need the "mod" pointer of the event structure, > make a union out of it in order to save memory (there's one structure for > each of the thousand+ events in the kernel), and have any event with the > DYNAMIC flag set to use a ref counter instead. > > Link: https://lore.kernel.org/linux-trace-devel/20210813004448.51c7de69ce432d338f4d226b@xxxxxxxxxx/ > This looks good to me, just one nitpick. [..] > + > +static inline void trace_event_put_ref(struct trace_event_call *call) > +{ > + if (call->flags & TRACE_EVENT_FL_DYNAMIC) > + return trace_event_dyn_put_ref(call); > + else > + return module_put(call->module); You don't need to return for void function. Except for this, Acked-by: Masami Hiramatsu <mhiramat@xxxxxxxxxx> Thank you! -- Masami Hiramatsu <mhiramat@xxxxxxxxxx>