Skip to content

Commit 2a30dbc

Browse files
Ruan Jinjierostedt
authored andcommitted
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: Ruan Jinjie <ruanjinjie@huawei.com> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
1 parent 1351148 commit 2a30dbc

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

kernel/trace/ftrace.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7140,9 +7140,7 @@ void ftrace_free_mem(struct module *mod, void *start_ptr, void *end_ptr)
71407140
struct dyn_ftrace key;
71417141
struct ftrace_mod_map *mod_map = NULL;
71427142
struct ftrace_init_func *func, *func_next;
7143-
struct list_head clear_hash;
7144-
7145-
INIT_LIST_HEAD(&clear_hash);
7143+
LIST_HEAD(clear_hash);
71467144

71477145
key.ip = start;
71487146
key.flags = end; /* overload flags, as it is unsigned long */

0 commit comments

Comments
 (0)