aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2010-03-05 20:02:19 -0500
committerSteven Rostedt <rostedt@goodmis.org>2010-03-05 21:00:30 -0500
commit801c29fd1fdeb84f60241beb445ff5db154450ae (patch)
treece6d2cf95d86c7863393914b5ba37c90b56b44e9 /kernel
parentae1f30384baef4056438d81b305a6a5199b0d16c (diff)
function-graph: Fix unused reference to ftrace_set_func()
The declaration of ftrace_set_func() is at the start of the ftrace.c file and wrapped with a #ifdef CONFIG_FUNCTION_GRAPH condition. If function graph tracing is enabled but CONFIG_DYNAMIC_FTRACE is not, a warning about that function being declared static and unused is given. This really should have been placed within the CONFIG_FUNCTION_GRAPH condition that uses ftrace_set_func(). Moving the declaration down fixes the warning and makes the code cleaner. Reported-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/trace/ftrace.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index d996353473fd..d0407c9f368c 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -85,10 +85,6 @@ ftrace_func_t ftrace_trace_function __read_mostly = ftrace_stub;
85ftrace_func_t __ftrace_trace_function __read_mostly = ftrace_stub; 85ftrace_func_t __ftrace_trace_function __read_mostly = ftrace_stub;
86ftrace_func_t ftrace_pid_function __read_mostly = ftrace_stub; 86ftrace_func_t ftrace_pid_function __read_mostly = ftrace_stub;
87 87
88#ifdef CONFIG_FUNCTION_GRAPH_TRACER
89static int ftrace_set_func(unsigned long *array, int *idx, char *buffer);
90#endif
91
92static void ftrace_list_func(unsigned long ip, unsigned long parent_ip) 88static void ftrace_list_func(unsigned long ip, unsigned long parent_ip)
93{ 89{
94 struct ftrace_ops *op = ftrace_list; 90 struct ftrace_ops *op = ftrace_list;
@@ -2300,6 +2296,8 @@ __setup("ftrace_filter=", set_ftrace_filter);
2300 2296
2301#ifdef CONFIG_FUNCTION_GRAPH_TRACER 2297#ifdef CONFIG_FUNCTION_GRAPH_TRACER
2302static char ftrace_graph_buf[FTRACE_FILTER_SIZE] __initdata; 2298static char ftrace_graph_buf[FTRACE_FILTER_SIZE] __initdata;
2299static int ftrace_set_func(unsigned long *array, int *idx, char *buffer);
2300
2303static int __init set_graph_function(char *str) 2301static int __init set_graph_function(char *str)
2304{ 2302{
2305 strlcpy(ftrace_graph_buf, str, FTRACE_FILTER_SIZE); 2303 strlcpy(ftrace_graph_buf, str, FTRACE_FILTER_SIZE);