linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ftrace: fix building with SYSCTL=y but DYNAMIC_FTRACE=n
@ 2022-04-21 18:57 Luis Chamberlain
  2022-04-21 19:09 ` Steven Rostedt
  0 siblings, 1 reply; 2+ messages in thread
From: Luis Chamberlain @ 2022-04-21 18:57 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: mingo, YueHaibing, patches, linux-kernel, mcgrof

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/202204161203.6dSlgKJX-lkp@intel.com

Reported-by: kernel test robot <lkp@intel.com>
Fixes: f8b7d2b4c192 ("ftrace: fix building with SYSCTL=n but DYNAMIC_FTRACE=y")
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
---
 kernel/trace/ftrace.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index d9424fd9a183..1f89039f0feb 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -7873,6 +7873,8 @@ int unregister_ftrace_function(struct ftrace_ops *ops)
 EXPORT_SYMBOL_GPL(unregister_ftrace_function);
 
 #ifdef CONFIG_SYSCTL
+
+#ifdef CONFIG_DYNAMIC_FTRACE
 static void ftrace_startup_sysctl(void)
 {
 	int command;
@@ -7906,6 +7908,10 @@ static void ftrace_shutdown_sysctl(void)
 		ftrace_run_update_code(command);
 	}
 }
+#else
+# define ftrace_startup_sysctl()       do { } while (0)
+# define ftrace_shutdown_sysctl()      do { } while (0)
+#endif /* CONFIG_DYNAMIC_FTRACE */
 
 static bool is_permanent_ops_registered(void)
 {
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ftrace: fix building with SYSCTL=y but DYNAMIC_FTRACE=n
  2022-04-21 18:57 [PATCH] ftrace: fix building with SYSCTL=y but DYNAMIC_FTRACE=n Luis Chamberlain
@ 2022-04-21 19:09 ` Steven Rostedt
  0 siblings, 0 replies; 2+ messages in thread
From: Steven Rostedt @ 2022-04-21 19:09 UTC (permalink / raw)
  To: Luis Chamberlain; +Cc: mingo, YueHaibing, patches, linux-kernel

On Thu, 21 Apr 2022 11:57:01 -0700
Luis Chamberlain <mcgrof@kernel.org> wrote:

> 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/202204161203.6dSlgKJX-lkp@intel.com
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Fixes: f8b7d2b4c192 ("ftrace: fix building with SYSCTL=n but DYNAMIC_FTRACE=y")
> Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>

Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org>

-- Steve

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-04-21 19:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-21 18:57 [PATCH] ftrace: fix building with SYSCTL=y but DYNAMIC_FTRACE=n Luis Chamberlain
2022-04-21 19:09 ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).