trace: ftrace.c ftrace_profile_debugfs should use __init
PATCH 1/1 trace: ftrace.c ftrace_profile_debugfs should use __init
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 <[email protected]>
--- kernel/trace/ftrace.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
kernel/trace/ftrace.c +3 -3
@@ -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;
Signature · 1 line
1.6.0.6