Commit 2a30dbcb authored by Ruan Jinjie's avatar Ruan Jinjie Committed by Steven Rostedt (Google)

ftrace: Use LIST_HEAD to initialize clear_hash

Use LIST_HEAD() to initialize clear_hash instead of open-coding it.

Link: https://lore.kernel.org/linux-trace-kernel/20230809071551.913041-1-ruanjinjie@huawei.com

Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: default avatarRuan Jinjie <ruanjinjie@huawei.com>
Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
parent 13511489
...@@ -7140,9 +7140,7 @@ void ftrace_free_mem(struct module *mod, void *start_ptr, void *end_ptr) ...@@ -7140,9 +7140,7 @@ void ftrace_free_mem(struct module *mod, void *start_ptr, void *end_ptr)
struct dyn_ftrace key; struct dyn_ftrace key;
struct ftrace_mod_map *mod_map = NULL; struct ftrace_mod_map *mod_map = NULL;
struct ftrace_init_func *func, *func_next; struct ftrace_init_func *func, *func_next;
struct list_head clear_hash; LIST_HEAD(clear_hash);
INIT_LIST_HEAD(&clear_hash);
key.ip = start; key.ip = start;
key.flags = end; /* overload flags, as it is unsigned long */ key.flags = end; /* overload flags, as it is unsigned long */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment