lkml.org 
[lkml]   [2014]   [Feb]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 6/6] ftrace: Fix compilation warning about control_ops_free
Date
With CONFIG_DYNAMIC_FTRACE=n, I see a warning:
kernel/trace/ftrace.c:240:13: warning: 'control_ops_free' defined but not used
static void control_ops_free(struct ftrace_ops *ops)
^
Add an ifdef block with CONFIG_DYNAMIC_FTRACE around that function as
it is used solely from the dynamic function tracing functions.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>
---
kernel/trace/ftrace.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 5bd70e8b09b0..34b1de9390af 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -237,10 +237,12 @@ static int control_ops_alloc(struct ftrace_ops *ops)
return 0;
}

+#ifdef CONFIG_DYNAMIC_FTRACE
static void control_ops_free(struct ftrace_ops *ops)
{
free_percpu(ops->disabled);
}
+#endif

static void update_global_ops(void)
{
--
1.8.5.2


\
 
 \ /
  Last update: 2014-02-24 20:41    [W:1.037 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site