diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/trace/ftrace.c | 12 | ||||
-rw-r--r-- | kernel/trace/trace.c | 4 |
2 files changed, 12 insertions, 4 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 080b7d41e17f..22fa55696760 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c | |||
@@ -3307,7 +3307,11 @@ void unregister_ftrace_function_probe_all(char *glob) | |||
3307 | static LIST_HEAD(ftrace_commands); | 3307 | static LIST_HEAD(ftrace_commands); |
3308 | static DEFINE_MUTEX(ftrace_cmd_mutex); | 3308 | static DEFINE_MUTEX(ftrace_cmd_mutex); |
3309 | 3309 | ||
3310 | int register_ftrace_command(struct ftrace_func_command *cmd) | 3310 | /* |
3311 | * Currently we only register ftrace commands from __init, so mark this | ||
3312 | * __init too. | ||
3313 | */ | ||
3314 | __init int register_ftrace_command(struct ftrace_func_command *cmd) | ||
3311 | { | 3315 | { |
3312 | struct ftrace_func_command *p; | 3316 | struct ftrace_func_command *p; |
3313 | int ret = 0; | 3317 | int ret = 0; |
@@ -3326,7 +3330,11 @@ int register_ftrace_command(struct ftrace_func_command *cmd) | |||
3326 | return ret; | 3330 | return ret; |
3327 | } | 3331 | } |
3328 | 3332 | ||
3329 | int unregister_ftrace_command(struct ftrace_func_command *cmd) | 3333 | /* |
3334 | * Currently we only unregister ftrace commands from __init, so mark | ||
3335 | * this __init too. | ||
3336 | */ | ||
3337 | __init int unregister_ftrace_command(struct ftrace_func_command *cmd) | ||
3330 | { | 3338 | { |
3331 | struct ftrace_func_command *p, *n; | 3339 | struct ftrace_func_command *p, *n; |
3332 | int ret = -ENODEV; | 3340 | int ret = -ENODEV; |
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 489da8b19f30..f9fa42b180e3 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
@@ -5477,12 +5477,12 @@ static struct ftrace_func_command ftrace_snapshot_cmd = { | |||
5477 | .func = ftrace_trace_snapshot_callback, | 5477 | .func = ftrace_trace_snapshot_callback, |
5478 | }; | 5478 | }; |
5479 | 5479 | ||
5480 | static int register_snapshot_cmd(void) | 5480 | static __init int register_snapshot_cmd(void) |
5481 | { | 5481 | { |
5482 | return register_ftrace_command(&ftrace_snapshot_cmd); | 5482 | return register_ftrace_command(&ftrace_snapshot_cmd); |
5483 | } | 5483 | } |
5484 | #else | 5484 | #else |
5485 | static inline int register_snapshot_cmd(void) { return 0; } | 5485 | static inline __init int register_snapshot_cmd(void) { return 0; } |
5486 | #endif /* defined(CONFIG_TRACER_SNAPSHOT) && defined(CONFIG_DYNAMIC_FTRACE) */ | 5486 | #endif /* defined(CONFIG_TRACER_SNAPSHOT) && defined(CONFIG_DYNAMIC_FTRACE) */ |
5487 | 5487 | ||
5488 | struct dentry *tracing_init_dentry_tr(struct trace_array *tr) | 5488 | struct dentry *tracing_init_dentry_tr(struct trace_array *tr) |