From patchwork Fri Oct 13 12:01:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 115762 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp644456qgn; Fri, 13 Oct 2017 05:01:51 -0700 (PDT) X-Google-Smtp-Source: AOwi7QCQ3a+UQTefp03RjUZ1WQAtZfwBVzXSfkBhnr8GoG1ZgTA1CCwzW03gAWZftY04VGkF56VQ X-Received: by 10.159.207.136 with SMTP id z8mr1185136plo.63.1507896111805; Fri, 13 Oct 2017 05:01:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507896111; cv=none; d=google.com; s=arc-20160816; b=dNdMGFf+YvFsYjwTLrfSgt2QQYjCemuRfrpIs7w+06LoKyQkygEuq7U1QdGpVjb+4w lO7En/I6jM/1UZbJL4EN5DTb6gtYF4o0JBVZp9ftoiIfIzC1WdrMPwjiUxvvL9AAijna +NxzpKACgOwLDfHbfBdy3uc/T6P1/91JLdcru1wo5SroXOwTIaFwWOZtHAIqNu54ua6e NyAD1jn90UuLnI6Ydb0O/AaF+Am1kmKul5iGuYNeAZwIIY/DRHDqyuIC8/vTGxwRz9bn ixgNcw7rRKw2Q8wWuGEyO2WcXo2xVXLHNDjXgcmrYqFxUooOB1PzsD6vV4yQ9lLRJNuV o4lw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=wWgRCgMMkr9FGmShpmr4wLwOhjg9+kZF5h85TKeIHvQ=; b=rigyR/zJTMivUgF1MAfUjmIBKaYtziKLIIlQkg5jw+Be7AXmffpn2wmoSIFvYKocpH xlMDo+Az5J4wT4nKBlC9A5JeDbv/j85J5Se5W07oBgm9Ui+PJFWizyFZNfyhug8OdQeS cu7Kdv1SNvIhtXUTueJ+sE269cOK7Lwf7bfcRXlSv0HSvQA06Mrx4k2Nku9XteNjhthR iusJIqrUhAYXY+P0iwPyUrGeZiQ4uwUPL3OVlnQgMXZ/SP/MVrxKyej27j9AXB619GQM 8l2tPqc/NUQXcrQI4nkf8+PQHUV61zjqKJCRYeBVObgD5D3qJj7vH5vRujFuVEyUAMzW Xf9g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g65si496941pfk.453.2017.10.13.05.01.51; Fri, 13 Oct 2017 05:01:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758153AbdJMMBu (ORCPT + 27 others); Fri, 13 Oct 2017 08:01:50 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:49343 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753452AbdJMMBs (ORCPT ); Fri, 13 Oct 2017 08:01:48 -0400 Received: from wuerfel.lan ([46.223.139.202]) by mrelayeu.kundenserver.de (mreue006 [212.227.15.129]) with ESMTPA (Nemesis) id 0MAGGD-1dwbnM49PN-00BKHv; Fri, 13 Oct 2017 14:01:38 +0200 From: Arnd Bergmann To: Steven Rostedt , Ingo Molnar Cc: Arnd Bergmann , Joel Fernandes , linux-kernel@vger.kernel.org Subject: [PATCH] tracing: hide unused functions Date: Fri, 13 Oct 2017 14:01:13 +0200 Message-Id: <20171013120135.3943860-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- kernel/trace/trace_selftest.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.9.0 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 #include +#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