mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Steven Rostedt <rostedt@goodmis.org>, Ingo Molnar <mingo@redhat.com>
Cc: Arnd Bergmann <arnd@arndb.de>, Joel Fernandes <joelaf@google.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH] tracing: hide unused functions
Date: Fri, 13 Oct 2017 14:01:13 +0200	[thread overview]
Message-ID: <20171013120135.3943860-1-arnd@arndb.de> (raw)

After trace_selftest_startup_sched_switch is removed, trace_test_buffer()
is now only used inside of CONFIG_FUNCTION_TRACER, leading to this
warning:

kernel/trace/trace_selftest.c:62:12: error: 'trace_test_buffer' defined but not used [-Werror=unused-function]

The same is true for a few other functions called by trace_test_buffer(),
so let's extend the #ifdef to cover all of them together.

Fixes: d8c4deee6dc6 ("tracing: Remove obsolete sched_switch tracer selftest")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 kernel/trace/trace_selftest.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/trace/trace_selftest.c b/kernel/trace/trace_selftest.c
index 364f78abdf47..bcdffeca9bd8 100644
--- a/kernel/trace/trace_selftest.c
+++ b/kernel/trace/trace_selftest.c
@@ -6,6 +6,8 @@
 #include <linux/delay.h>
 #include <linux/slab.h>
 
+#ifdef CONFIG_FUNCTION_TRACER
+
 static inline int trace_valid_entry(struct trace_entry *entry)
 {
 	switch (entry->type) {
@@ -98,7 +100,6 @@ static inline void warn_failed_init_tracer(struct tracer *trace, int init_ret)
 	printk(KERN_WARNING "Failed to init %s tracer, init returned %d\n",
 		trace->name, init_ret);
 }
-#ifdef CONFIG_FUNCTION_TRACER
 
 #ifdef CONFIG_DYNAMIC_FTRACE
 
-- 
2.9.0

             reply	other threads:[~2017-10-13 12:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-13 12:01 Arnd Bergmann [this message]
2017-10-13 13:02 ` Arnd Bergmann
2017-10-13 13:24   ` 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=20171013120135.3943860-1-arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=joelaf@google.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®