diff options
author | Ruan Jinjie <ruanjinjie@huawei.com> | 2023-08-09 09:15:51 +0200 |
---|---|---|
committer | Steven Rostedt (Google) <rostedt@goodmis.org> | 2023-09-02 03:18:38 +0200 |
commit | 2a30dbcbef96f4073d3a5f8708865b1aab0bfc6d (patch) | |
tree | 6ff833773497ab9cf6f52bca9cf489caf8d9651c /kernel/trace | |
parent | ftrace: Use within_module to check rec->ip within specified module. (diff) | |
download | linux-2a30dbcbef96f4073d3a5f8708865b1aab0bfc6d.tar.xz linux-2a30dbcbef96f4073d3a5f8708865b1aab0bfc6d.zip |
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>
Diffstat (limited to 'kernel/trace')
-rw-r--r-- | kernel/trace/ftrace.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index c46dd6d97afe..8de8bec5f366 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -7140,9 +7140,7 @@ void ftrace_free_mem(struct module *mod, void *start_ptr, void *end_ptr) struct dyn_ftrace key; struct ftrace_mod_map *mod_map = NULL; struct ftrace_init_func *func, *func_next; - struct list_head clear_hash; - - INIT_LIST_HEAD(&clear_hash); + LIST_HEAD(clear_hash); key.ip = start; key.flags = end; /* overload flags, as it is unsigned long */ |