From: Jiri Slaby <jslaby@suse.cz>
To: rostedt@goodmis.org
Cc: jirislaby@gmail.com, linux-kernel@vger.kernel.org,
Jiri Slaby <jslaby@suse.cz>,
Frederic Weisbecker <fweisbec@gmail.com>,
Ingo Molnar <mingo@redhat.com>
Subject: [PATCH 6/6] ftrace: fix compilation warning about control_ops_free
Date: Thu, 20 Feb 2014 11:33:07 +0100 [thread overview]
Message-ID: <1392892387-26826-6-git-send-email-jslaby@suse.cz> (raw)
In-Reply-To: <1392892387-26826-1-git-send-email-jslaby@suse.cz>
With CONFIG_DYNAMIC_FTRACE=n, I see a warning:
kernel/trace/ftrace.c:240:13: warning: 'control_ops_free' defined but not used
static void control_ops_free(struct ftrace_ops *ops)
^
Add an ifdef block with CONFIG_DYNAMIC_FTRACE around that function as
it is used solely from the dynamic function tracing functions.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>
---
kernel/trace/ftrace.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 6e30412a5902..cf97b56b986c 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -237,10 +237,12 @@ static int control_ops_alloc(struct ftrace_ops *ops)
return 0;
}
+#ifdef CONFIG_DYNAMIC_FTRACE
static void control_ops_free(struct ftrace_ops *ops)
{
free_percpu(ops->disabled);
}
+#endif
static void update_global_ops(void)
{
--
1.8.5.2
next prev parent reply other threads:[~2014-02-20 10:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-20 10:33 [PATCH 1/6] ftrace: cleanup of global variables Jiri Slaby
2014-02-20 10:33 ` [PATCH 2/6] ftrace: inline the code from ftrace_dyn_table_alloc Jiri Slaby
2014-02-20 10:33 ` [PATCH 3/6] ftrace: pass retval through return in ftrace_dyn_arch_init Jiri Slaby
2014-02-20 10:33 ` [PATCH 4/6] ftrace: do not pass data to ftrace_dyn_arch_init Jiri Slaby
2014-02-20 10:33 ` [PATCH 5/6] ftrace: remove freelist from struct dyn_ftrace Jiri Slaby
2014-02-20 10:33 ` Jiri Slaby [this message]
2014-02-20 15:39 ` [PATCH 1/6] ftrace: cleanup of global variables Steven Rostedt
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=1392892387-26826-6-git-send-email-jslaby@suse.cz \
--to=jslaby@suse.cz \
--cc=fweisbec@gmail.com \
--cc=jirislaby@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.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
all inboxes | Powered by JetHome®