summaryrefslogtreecommitdiff
path: root/kernel/trace
diff options
context:
space:
mode:
authorChangbin Du <changbin.du@gmail.com>2019-09-10 17:33:36 +0300
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2019-09-17 18:21:20 +0300
commit08468754c16e731d31538a8b1b0b433be2410a89 (patch)
treeace93da8e310a960008fdf4d93448603255b1994 /kernel/trace
parentac68154626ab7fe4ce5f424937c34f42a3e20c5b (diff)
downloadlinux-08468754c16e731d31538a8b1b0b433be2410a89.tar.xz
ftrace: Simplify ftrace hash lookup code in clear_func_from_hash()
Function ftrace_lookup_ip() will check empty hash table. So we don't need extra check outside. Link: http://lkml.kernel.org/r/20190910143336.13472-1-changbin.du@gmail.com Signed-off-by: Changbin Du <changbin.du@gmail.com> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace')
-rw-r--r--kernel/trace/ftrace.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index f9821a3374e9..c4cc048eb594 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -6036,11 +6036,7 @@ clear_func_from_hash(struct ftrace_init_func *func, struct ftrace_hash *hash)
{
struct ftrace_func_entry *entry;
- if (ftrace_hash_empty(hash))
- return;
-
- entry = __ftrace_lookup_ip(hash, func->ip);
-
+ entry = ftrace_lookup_ip(hash, func->ip);
/*
* Do not allow this rec to match again.
* Yeah, it may waste some memory, but will be removed