linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ftrace: remove unused pointer ftrace_swapper_pid
@ 2018-08-09 12:56 Colin King
  2018-08-09 14:18 ` Steven Rostedt
  0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2018-08-09 12:56 UTC (permalink / raw)
  To: Steven Rostedt, Ingo Molnar; +Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

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=]

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 kernel/trace/ftrace.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index caf9cbf35816..2cc008cfbd4f 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -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
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ftrace: remove unused pointer ftrace_swapper_pid
  2018-08-09 12:56 [PATCH] ftrace: remove unused pointer ftrace_swapper_pid Colin King
@ 2018-08-09 14:18 ` Steven Rostedt
  0 siblings, 0 replies; 2+ messages in thread
From: Steven Rostedt @ 2018-08-09 14:18 UTC (permalink / raw)
  To: Colin King; +Cc: Ingo Molnar, kernel-janitors, linux-kernel

On Thu,  9 Aug 2018 13:56:09 +0100
Colin King <colin.king@canonical.com> wrote:

> From: Colin Ian King <colin.king@canonical.com>
> 
> 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

> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  kernel/trace/ftrace.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
> index caf9cbf35816..2cc008cfbd4f 100644
> --- a/kernel/trace/ftrace.c
> +++ b/kernel/trace/ftrace.c
> @@ -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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-08-09 14:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-09 12:56 [PATCH] ftrace: remove unused pointer ftrace_swapper_pid Colin King
2018-08-09 14:18 ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).