瀏覽代碼

ftrace: Fix warning when CONFIG_FUNCTION_TRACER is not defined

The struct ftrace_hash was declared within CONFIG_FUNCTION_TRACER
but was referenced outside of it.

Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Steven Rostedt 14 年之前
父節點
當前提交
04da85b861
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      include/linux/ftrace.h

+ 2 - 2
include/linux/ftrace.h

@@ -19,6 +19,8 @@
 
 
 #include <asm/ftrace.h>
 #include <asm/ftrace.h>
 
 
+struct ftrace_hash;
+
 #ifdef CONFIG_FUNCTION_TRACER
 #ifdef CONFIG_FUNCTION_TRACER
 
 
 extern int ftrace_enabled;
 extern int ftrace_enabled;
@@ -29,8 +31,6 @@ ftrace_enable_sysctl(struct ctl_table *table, int write,
 
 
 typedef void (*ftrace_func_t)(unsigned long ip, unsigned long parent_ip);
 typedef void (*ftrace_func_t)(unsigned long ip, unsigned long parent_ip);
 
 
-struct ftrace_hash;
-
 enum {
 enum {
 	FTRACE_OPS_FL_ENABLED		= 1 << 0,
 	FTRACE_OPS_FL_ENABLED		= 1 << 0,
 	FTRACE_OPS_FL_GLOBAL		= 1 << 1,
 	FTRACE_OPS_FL_GLOBAL		= 1 << 1,