Commit 7a6735cc authored by Menglong Dong's avatar Menglong Dong Committed by Steven Rostedt (Google)
Browse files

ftrace: Avoid redundant initialization in register_ftrace_direct

The FTRACE_OPS_FL_INITIALIZED flag is cleared in register_ftrace_direct,
which can make it initialized by ftrace_ops_init() even if it is already
initialized. It seems that there is no big deal here, but let's still fix
it.

Link: https://patch.msgid.link/20251110121808.1559240-1-dongml2@chinatelecom.cn


Fixes: f64dd462 ("ftrace: Add multi direct register/unregister interface")
Acked-by: default avatarJiri Olsa <jolsa@kernel.org>
Signed-off-by: default avatarMenglong Dong <dongml2@chinatelecom.cn>
Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
parent 49c1364c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -6069,7 +6069,7 @@ int register_ftrace_direct(struct ftrace_ops *ops, unsigned long addr)
	new_hash = NULL;

	ops->func = call_direct_funcs;
	ops->flags = MULTI_FLAGS;
	ops->flags |= MULTI_FLAGS;
	ops->trampoline = FTRACE_REGS_ADDR;
	ops->direct_call = addr;