From: Ruan Jinjie Date: Wed, 9 Aug 2023 07:15:51 +0000 (+0800) Subject: ftrace: Use LIST_HEAD to initialize clear_hash X-Git-Tag: v6.6.17~3930^2~23 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2a30dbcbef96f4073d3a5f8708865b1aab0bfc6d;p=platform%2Fkernel%2Flinux-rpi.git 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 Cc: Mark Rutland Signed-off-by: Ruan Jinjie Signed-off-by: Steven Rostedt (Google) --- diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index c46dd6d..8de8bec 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 */