File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -533,11 +533,11 @@ static inline int ftrace_force_update(void) { return 0; }
533533static inline void ftrace_disable_daemon (void ) { }
534534static inline void ftrace_enable_daemon (void ) { }
535535static inline void ftrace_release_mod (struct module * mod ) {}
536- static inline int register_ftrace_command (struct ftrace_func_command * cmd )
536+ static inline __init int register_ftrace_command (struct ftrace_func_command * cmd )
537537{
538538 return - EINVAL ;
539539}
540- static inline int unregister_ftrace_command (char * cmd_name )
540+ static inline __init int unregister_ftrace_command (char * cmd_name )
541541{
542542 return - EINVAL ;
543543}
Original file line number Diff line number Diff line change @@ -3307,7 +3307,11 @@ void unregister_ftrace_function_probe_all(char *glob)
33073307static LIST_HEAD (ftrace_commands );
33083308static DEFINE_MUTEX (ftrace_cmd_mutex );
33093309
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 )
33113315{
33123316 struct ftrace_func_command * p ;
33133317 int ret = 0 ;
@@ -3326,7 +3330,11 @@ int register_ftrace_command(struct ftrace_func_command *cmd)
33263330 return ret ;
33273331}
33283332
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 )
33303338{
33313339 struct ftrace_func_command * p , * n ;
33323340 int ret = - ENODEV ;
Original file line number Diff line number Diff line change @@ -5477,12 +5477,12 @@ static struct ftrace_func_command ftrace_snapshot_cmd = {
54775477 .func = ftrace_trace_snapshot_callback ,
54785478};
54795479
5480- static int register_snapshot_cmd (void )
5480+ static __init int register_snapshot_cmd (void )
54815481{
54825482 return register_ftrace_command (& ftrace_snapshot_cmd );
54835483}
54845484#else
5485- static inline int register_snapshot_cmd (void ) { return 0 ; }
5485+ static inline __init int register_snapshot_cmd (void ) { return 0 ; }
54865486#endif /* defined(CONFIG_TRACER_SNAPSHOT) && defined(CONFIG_DYNAMIC_FTRACE) */
54875487
54885488struct dentry * tracing_init_dentry_tr (struct trace_array * tr )
You can’t perform that action at this time.
0 commit comments