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>
This commit is contained in:
parent
ac68154626
commit
08468754c1
@ -6036,11 +6036,7 @@ clear_func_from_hash(struct ftrace_init_func *func, struct ftrace_hash *hash)
|
|||||||
{
|
{
|
||||||
struct ftrace_func_entry *entry;
|
struct ftrace_func_entry *entry;
|
||||||
|
|
||||||
if (ftrace_hash_empty(hash))
|
entry = ftrace_lookup_ip(hash, func->ip);
|
||||||
return;
|
|
||||||
|
|
||||||
entry = __ftrace_lookup_ip(hash, func->ip);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Do not allow this rec to match again.
|
* Do not allow this rec to match again.
|
||||||
* Yeah, it may waste some memory, but will be removed
|
* Yeah, it may waste some memory, but will be removed
|
||||||
|
Loading…
x
Reference in New Issue
Block a user