Skip to contentSkip to conversation

ftrace: remove unused pointer ftrace_swapper_pid

PATCH Applied Colin King 2 participants 2 messages Aug 9, 2018

Subsystems (3)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 ftrace: remove unused pointer ftrace_swapper_pid

From: Colin Ian King <[email protected]>

Pointer ftrace_swapper_pid is defined but is never used hence it is redundant and can be removed. The use of this variable was removed in commit 345ddcc882d8 ("ftrace: Have set_ftrace_pid use the bitmap like events do").

Cleans up clang warning:
warning: 'ftrace_swapper_pid' defined but not used [-Wunused-const-variable=]

---
 kernel/trace/ftrace.c | 2 --
 1 file changed, 2 deletions(-)
kernel/trace/ftrace.c +0 -2
index caf9cbf35816..2cc008cfbd4f 100644
@@ -1049,8 +1049,6 @@ static __init void ftrace_profile_tracefs(struct dentry *d_tracer)
 }
 #endif /* CONFIG_FUNCTION_PROFILER */
 
-static struct pid * const ftrace_swapper_pid = &init_struct_pid;
-
 #ifdef CONFIG_FUNCTION_GRAPH_TRACER
 static int ftrace_graph_active;
 #else
Signature · 1 line
2.17.1
maintainer Applied
#1 lore raw
Quoted 9 lines · On Thu, 9 Aug 2018 13:56:09 +0100 Colin King <[email protected]> wrote:

From: Colin Ian King <[email protected]>

Pointer ftrace_swapper_pid is defined but is never used hence it is redundant and can be removed. The use of this variable was removed in commit 345ddcc882d8 ("ftrace: Have set_ftrace_pid use the bitmap like events do").

Cleans up clang warning:
warning: 'ftrace_swapper_pid' defined but not used [-Wunused-const-variable=]

Thanks, applied!

-- Steve

Quoted 19 lines
---
 kernel/trace/ftrace.c | 2 --
 1 file changed, 2 deletions(-)
kernel/trace/ftrace.c +0 -2
index caf9cbf35816..2cc008cfbd4f 100644
@@ -1049,8 +1049,6 @@ static __init void ftrace_profile_tracefs(struct dentry *d_tracer)
 }
 #endif /* CONFIG_FUNCTION_PROFILER */
 
-static struct pid * const ftrace_swapper_pid = &init_struct_pid;
-
 #ifdef CONFIG_FUNCTION_GRAPH_TRACER
 static int ftrace_graph_active;
 #else