From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Arnd Bergmann <arnd@arndb.de>
Subject: [for-next][PATCH 4/4] ftrace: Hide cached module code for !CONFIG_MODULES
Date: Wed, 12 Jul 2017 08:57:12 -0400 [thread overview]
Message-ID: <20170712125726.105948984@goodmis.org> (raw)
In-Reply-To: 20170712125708.904785252@goodmis.org
[-- Attachment #1: 0004-ftrace-Hide-cached-module-code-for-CONFIG_MODULES.patch --]
[-- Type: text/plain, Size: 1223 bytes --]
From: Arnd Bergmann <arnd@arndb.de>
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>
---
kernel/trace/ftrace.c | 2 ++
1 file changed, 2 insertions(+)
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
--
2.10.2
prev parent reply other threads:[~2017-07-12 12:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-12 12:57 [for-next][PATCH 0/4] tracing: More last minute updates for 4.13 Steven Rostedt
2017-07-12 12:57 ` [for-next][PATCH 1/4] tracing: Fixup trace file header alignment Steven Rostedt
2017-07-12 13:02 ` Joel Fernandes
2017-07-12 12:57 ` [for-next][PATCH 2/4] tracing: Update Documentation/trace/ftrace.txt Steven Rostedt
2017-07-12 12:57 ` [for-next][PATCH 3/4] tracing: Do note expose stack_trace_filter without DYNAMIC_FTRACE Steven Rostedt
2017-07-12 12:57 ` Steven Rostedt [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170712125726.105948984@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox