[PATCH -tip] trace: ftrace.c ftrace_profile_debugfs should use__init

From: Jaswinder Singh Rajput
Date: Thu Apr 16 2009 - 18:12:58 EST


Impact: fix section mismatch warning
WARNING: kernel/built-in.o(.text+0xabe09): Section mismatch in reference from the function ftrace_profile_debugfs() to the variable .init.data:function_stats
The function ftrace_profile_debugfs() references
the variable __initdata function_stats.
This is often because ftrace_profile_debugfs lacks a __initdata
annotation or the annotation of function_stats is wrong.

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@xxxxxxxxx>
---
kernel/trace/ftrace.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 5b606f4..96333f1 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -761,7 +761,7 @@ static struct tracer_stat function_stats __initdata = {
.stat_show = function_stat_show
};

-static void ftrace_profile_debugfs(struct dentry *d_tracer)
+static void __init ftrace_profile_debugfs(struct dentry *d_tracer)
{
struct ftrace_profile_stat *stat;
struct dentry *entry;
@@ -806,7 +806,7 @@ static void ftrace_profile_debugfs(struct dentry *d_tracer)
}

#else /* CONFIG_FUNCTION_PROFILER */
-static void ftrace_profile_debugfs(struct dentry *d_tracer)
+static void __init ftrace_profile_debugfs(struct dentry *d_tracer)
{
}
#endif /* CONFIG_FUNCTION_PROFILER */
@@ -3007,7 +3007,7 @@ static const struct file_operations ftrace_pid_fops = {
.write = ftrace_pid_write,
};

-static __init int ftrace_init_debugfs(void)
+static int __init ftrace_init_debugfs(void)
{
struct dentry *d_tracer;

--
1.6.0.6



--
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/