From patchwork Mon Oct 16 22:02:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 115993 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp4160558qgn; Mon, 16 Oct 2017 15:03:01 -0700 (PDT) X-Google-Smtp-Source: AOwi7QBjrcBX8oOallkk3exANnKnbdL1/YE8kfB1uQeLm6tx+2OxduTlObbtn6+CeYxp8JrsHCe8 X-Received: by 10.159.197.11 with SMTP id bj11mr10206662plb.354.1508191381328; Mon, 16 Oct 2017 15:03:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508191381; cv=none; d=google.com; s=arc-20160816; b=h16xNe98JX6YasIUNwdQlT/ALSiV4vMnbSmgocCG3d0Hn0owFx6nnT6nt4hBaNBpOU uV+LegJY3fBuIGZi0gQODpVgPp8HhfyMR/NWFpjRKdPaAJiD+65FQcn4cOLbXfMDpDg+ yBDs1V2Mc+p6HaxDkvd3K3DMK4AWUmmovhbved5AcpJZvASh2wehaaVWPxUpy7jCvpon TOu9txlUuD0oA4xep9ssENvEkWY7hByxTJCHO/wh1dRoe05PpeBFAzsvgwtRhVA0Cf4w tm3SyMTaavloKXa4vaWgNL+OPMLrSlaP1uoUYsmp3jDZJq5X6lk+ycOtV4cbfu5MUvV6 pxiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition:mime-version :references:subject:cc:to:from:date:user-agent:message-id :dmarc-filter:arc-authentication-results; bh=gw6TUO526xsSGmIBWVURZpmsU/FNwzwE24z5DiqMjDc=; b=1Er5no2lTViVZMKCGOsZ8NdX2aYrW363WYi90R+87aAHNk106cakpHLhWcDzyxhAVB Hvz1njvzM7I18laX7/2kRisthJjiUxw8X+cWsiaVNB/0SwkVtaLBnLKvbIVUndKepS4p iwUX8HYmRY8XUF/ixs/m0m4Eue3xFSofidpp1xSen6ZetwmBGL9nWwRO4hgZ2/CVuIXL dtT88ZdZr2cok1bIvEcAy4EA73fVHpBcdQhKTCN7YzGK89lFxdwHmgMfyBudI/WQ8FBN ecYqASqvueuItZ3JipX3MKC0vkts2D18tkg1+Iic9oeliNTcH12mX8BigPxjpxIqTmKX NcUg== 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 a33si273995pld.210.2017.10.16.15.03.01; Mon, 16 Oct 2017 15:03:01 -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 S1755624AbdJPWC7 (ORCPT + 27 others); Mon, 16 Oct 2017 18:02:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:34360 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754053AbdJPWC4 (ORCPT ); Mon, 16 Oct 2017 18:02:56 -0400 Received: from gandalf.local.home (cpe-67-246-153-56.stny.res.rr.com [67.246.153.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D9FFB21924; Mon, 16 Oct 2017 22:02:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D9FFB21924 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 Received: from rostedt by gandalf.local.home with local (Exim 4.89) (envelope-from ) id 1e4DTK-0004iH-Ss; Mon, 16 Oct 2017 18:02:54 -0400 Message-Id: <20171016220254.785554428@goodmis.org> User-Agent: quilt/0.63-1 Date: Mon, 16 Oct 2017 18:02:41 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Ingo Molnar , Andrew Morton , Arnd Bergmann Subject: [for-next][PATCH 2/4] tracing: mark trace_test_buffer as __maybe_unused References: <20171016220239.257019816@goodmis.org> MIME-Version: 1.0 Content-Disposition: inline; filename=0002-tracing-mark-trace_test_buffer-as-__maybe_unused.patch Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann After trace_selftest_startup_sched_switch is removed, trace_test_buffer() is only used sometimes, leading to this warning: kernel/trace/trace_selftest.c:62:12: error: 'trace_test_buffer' defined but not used [-Werror=unused-function] There is no simple #ifdef condition that captures well whether the function is in fact used or not, so marking it as __maybe_unused is probably the best way to shut up the warning. The function will then be silently dropped when there is no user. Link: http://lkml.kernel.org/r/20171013142227.1273469-1-arnd@arndb.de Fixes: d8c4deee6dc6 ("tracing: Remove obsolete sched_switch tracer selftest") Signed-off-by: Arnd Bergmann Signed-off-by: Steven Rostedt (VMware) --- kernel/trace/trace_selftest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.13.2 diff --git a/kernel/trace/trace_selftest.c b/kernel/trace/trace_selftest.c index 364f78abdf47..eb9ba5c1ba40 100644 --- a/kernel/trace/trace_selftest.c +++ b/kernel/trace/trace_selftest.c @@ -59,7 +59,7 @@ static int trace_test_buffer_cpu(struct trace_buffer *buf, int cpu) * Test the trace buffer to see if all the elements * are still sane. */ -static int trace_test_buffer(struct trace_buffer *buf, unsigned long *count) +static int __maybe_unused trace_test_buffer(struct trace_buffer *buf, unsigned long *count) { unsigned long flags, cnt = 0; int cpu, ret = 0;