mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Ingo Molnar <mingo@redhat.com>,
	Joel Fernandes <joelaf@google.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] tracing: hide unused functions
Date: Fri, 13 Oct 2017 09:24:15 -0400	[thread overview]
Message-ID: <20171013092415.466ad2d9@gandalf.local.home> (raw)
In-Reply-To: <CAK8P3a0=JrfLz0NFA2LtfX4v4Cvwv_NSQfKvq6eKG88WHU5pmQ@mail.gmail.com>

On Fri, 13 Oct 2017 15:02:34 +0200
Arnd Bergmann <arnd@arndb.de> wrote:

> On Fri, Oct 13, 2017 at 2:01 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> > 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>  
> 
> Nevermind, I ran into another problem with this applied: trace_test_buffer()
> is used elsewhere after all, just not for all possible combinations.
> 
> Maybe marking it as __maybe_unused would be more appropriate?

If that quiets the warning for you. This selftest code isn't something
for production, so it shouldn't be that critical. It's only used to
sanity check various parts of tracing.

-- Steve

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

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-13 12:01 Arnd Bergmann
2017-10-13 13:02 ` Arnd Bergmann
2017-10-13 13:24   ` 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=20171013092415.466ad2d9@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=arnd@arndb.de \
    --cc=joelaf@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    /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®