Skip to contentSkip to conversation

ftrace: remove unnecessary if condition of __unregister_ftrace_function

PATCH New walimis 1 participant 1 message Nov 13, 2008

Subsystems (2)
lore
Share & tools
lore

walimis

author
#0 lore raw

PATCH 1/1 ftrace: remove unnecessary if condition of __unregister_ftrace_function

against ftrace git tree tip/devel branch:
81388fbbc4b00c3bf37db5e193c80106ce5a2abf

Because it has goto out before ftrace_list == &ftrace_list_end, that's to say, we never meet this condition.

---
 kernel/trace/ftrace.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
kernel/trace/ftrace.c +1 -2
index beb21a5..54cb9a7 100644
@@ -179,8 +179,7 @@ static int __unregister_ftrace_function(struct ftrace_ops *ops)
 
 	if (ftrace_enabled) {
 		/* If we only have one func left, then call that directly */
-		if (ftrace_list == &ftrace_list_end ||
-		    ftrace_list->next == &ftrace_list_end)
+		if (ftrace_list->next == &ftrace_list_end)
 			ftrace_trace_function = ftrace_list->func;
 	}
 
Signature · 1 line
1.6.0.3