summaryrefslogtreecommitdiff
path: root/kernel/trace
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2017-07-10 10:44:03 +0200
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2017-07-11 19:29:04 -0400
commit69449bbd65687e8e5fb968a5a0c46089f6af6001 (patch)
tree6ea92add031fd9d72e7b13bb5cfcc03a0ecdd716 /kernel/trace
parentbbd1d27d863d5c0acee65ecd0c2e34035e1df5ea (diff)
ftrace: Hide cached module code for !CONFIG_MODULES
When modules are disabled, we get a harmless build warning: kernel/trace/ftrace.c:4051:13: error: 'process_cached_mods' defined but not used [-Werror=unused-function] This adds the same #ifdef around the new code that exists around its caller. Link: http://lkml.kernel.org/r/20170710084413.1820568-1-arnd@arndb.de Fixes: d7fbf8df7ca0 ("ftrace: Implement cached modules tracing on module load") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace')
-rw-r--r--kernel/trace/ftrace.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 2953d558bbee..4706f0ed193e 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -3978,6 +3978,7 @@ static int
ftrace_set_regex(struct ftrace_ops *ops, unsigned char *buf, int len,
int reset, int enable);
+#ifdef CONFIG_MODULES
static void process_mod_list(struct list_head *head, struct ftrace_ops *ops,
char *mod, bool enable)
{
@@ -4068,6 +4069,7 @@ static void process_cached_mods(const char *mod_name)
kfree(mod);
}
+#endif
/*
* We register the module command as a template to show others how