Skip to contentSkip to conversation

tracing: Get rid of obsolete global_start_up variable

PATCH In review Namhyung Kim 2 participants 2 messages Jun 12, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tracing: Get rid of obsolete global_start_up variable

It seems like it's a leftover from commit 4104d326b670 ("ftrace:
Remove global function list and call function directly"). As it isn't updated at all, checking its value is meaningless.

Let's get rid of it.

---
 kernel/trace/ftrace.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
kernel/trace/ftrace.c +1 -3
index cc07b7fc4372..071908f58e7a 100644
@@ -2053,7 +2053,6 @@ static void ftrace_run_update_code(int command)
 
 static ftrace_func_t saved_ftrace_func;
 static int ftrace_start_up;
-static int global_start_up;
 
 static void control_ops_free(struct ftrace_ops *ops)
 {
@@ -2117,8 +2116,7 @@ static int ftrace_shutdown(struct ftrace_ops *ops, int command)
 
 	ftrace_hash_rec_disable(ops, 1);
 
-	if (!global_start_up)
-		ops->flags &= ~FTRACE_OPS_FL_ENABLED;
+	ops->flags &= ~FTRACE_OPS_FL_ENABLED;
 
 	command |= FTRACE_UPDATE_CALLS;
 
Signature · 1 line
1.7.9.2
maintainer
#1 lore raw
Quoted 5 lines · On Thu, 12 Jun 2014 23:56:12 +0900 Namhyung Kim <[email protected]> wrote:

It seems like it's a leftover from commit 4104d326b670 ("ftrace:
Remove global function list and call function directly"). As it isn't updated at all, checking its value is meaningless.

Let's get rid of it.

Thanks, I added this to my 3.17 queue.

-- Steve

Quoted 28 lines
---
 kernel/trace/ftrace.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
kernel/trace/ftrace.c +1 -3
index cc07b7fc4372..071908f58e7a 100644
@@ -2053,7 +2053,6 @@ static void ftrace_run_update_code(int command)
 
 static ftrace_func_t saved_ftrace_func;
 static int ftrace_start_up;
-static int global_start_up;
 
 static void control_ops_free(struct ftrace_ops *ops)
 {
@@ -2117,8 +2116,7 @@ static int ftrace_shutdown(struct ftrace_ops *ops, int command)
 
 	ftrace_hash_rec_disable(ops, 1);
 
-	if (!global_start_up)
-		ops->flags &= ~FTRACE_OPS_FL_ENABLED;
+	ops->flags &= ~FTRACE_OPS_FL_ENABLED;
 
 	command |= FTRACE_UPDATE_CALLS;