Commit 08468754 authored by Changbin Du's avatar Changbin Du Committed by Steven Rostedt (VMware)
Browse files

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.


Signed-off-by: default avatarChangbin Du <>
Signed-off-by: default avatarSteven Rostedt (VMware) <>
parent ac681546
......@@ -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))
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
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