lkml.org 
[lkml]   [2017]   [Oct]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] tracing: hide unused functions
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

\
 
 \ /
  Last update: 2017-10-13 15:25    [W:0.038 / U:1.448 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site