Skip to content

Commit 0846875

Browse files
changbindurostedt
authored andcommitted
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/[email protected] Signed-off-by: Changbin Du <[email protected]> Signed-off-by: Steven Rostedt (VMware) <[email protected]>
1 parent ac68154 commit 0846875

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

kernel/trace/ftrace.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6036,11 +6036,7 @@ clear_func_from_hash(struct ftrace_init_func *func, struct ftrace_hash *hash)
60366036
{
60376037
struct ftrace_func_entry *entry;
60386038

6039-
if (ftrace_hash_empty(hash))
6040-
return;
6041-
6042-
entry = __ftrace_lookup_ip(hash, func->ip);
6043-
6039+
entry = ftrace_lookup_ip(hash, func->ip);
60446040
/*
60456041
* Do not allow this rec to match again.
60466042
* Yeah, it may waste some memory, but will be removed

0 commit comments

Comments
 (0)