[PATCH 6/6] ftrace: fix compilation warning about control_ops_free

From: Jiri Slaby
Date: Thu Feb 20 2014 - 05:33:23 EST


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@xxxxxxx>
Cc: Steven Rostedt <rostedt@xxxxxxxxxxx>
Cc: Frederic Weisbecker <fweisbec@xxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxxxxx>
---
kernel/trace/ftrace.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 6e30412a5902..cf97b56b986c 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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/