From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757990AbdJMNYT (ORCPT ); Fri, 13 Oct 2017 09:24:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:36968 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753380AbdJMNYS (ORCPT ); Fri, 13 Oct 2017 09:24:18 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8201621876 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=goodmis.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=rostedt@goodmis.org Date: Fri, 13 Oct 2017 09:24:15 -0400 From: Steven Rostedt To: Arnd Bergmann Cc: Ingo Molnar , Joel Fernandes , Linux Kernel Mailing List Subject: Re: [PATCH] tracing: hide unused functions Message-ID: <20171013092415.466ad2d9@gandalf.local.home> In-Reply-To: References: <20171013120135.3943860-1-arnd@arndb.de> X-Mailer: Claws Mail 3.14.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 13 Oct 2017 15:02:34 +0200 Arnd Bergmann wrote: > On Fri, Oct 13, 2017 at 2:01 PM, Arnd Bergmann 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 > > 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