Skip to content

Commit 8fd7c21

Browse files
committed
ftrace: fix building with SYSCTL=y but DYNAMIC_FTRACE=n
Ok so hopefully this is the last of it. 0day picked up a build failure [0] when SYSCTL=y but DYNAMIC_FTRACE=n. This can be fixed by just declaring an empty routine for the calls moved just recently. [0] https://lkml.kernel.org/r/[email protected] Reported-by: kernel test robot <[email protected]> Fixes: f8b7d2b ("ftrace: fix building with SYSCTL=n but DYNAMIC_FTRACE=y") Acked-by: Steven Rostedt (Google) <[email protected]> Signed-off-by: Luis Chamberlain <[email protected]>
1 parent cb55f27 commit 8fd7c21

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

kernel/trace/ftrace.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7873,6 +7873,8 @@ int unregister_ftrace_function(struct ftrace_ops *ops)
78737873
EXPORT_SYMBOL_GPL(unregister_ftrace_function);
78747874

78757875
#ifdef CONFIG_SYSCTL
7876+
7877+
#ifdef CONFIG_DYNAMIC_FTRACE
78767878
static void ftrace_startup_sysctl(void)
78777879
{
78787880
int command;
@@ -7906,6 +7908,10 @@ static void ftrace_shutdown_sysctl(void)
79067908
ftrace_run_update_code(command);
79077909
}
79087910
}
7911+
#else
7912+
# define ftrace_startup_sysctl() do { } while (0)
7913+
# define ftrace_shutdown_sysctl() do { } while (0)
7914+
#endif /* CONFIG_DYNAMIC_FTRACE */
79097915

79107916
static bool is_permanent_ops_registered(void)
79117917
{

0 commit comments

Comments
 (0)