From patchwork Mon May 28 15:41:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10433451 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9C259602CB for ; Mon, 28 May 2018 15:42:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8B34C2899E for ; Mon, 28 May 2018 15:42:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7FA9F28AF1; Mon, 28 May 2018 15:42:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DF9F12899E for ; Mon, 28 May 2018 15:42:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=256s5OMVXtawVu8/r1O/ZH8Y7NHg5oQNpd6X2n1rNMU=; b=iU5 mEJBREL2DH/1w1v7Hq4UUgZ+LHWNaYeEsR2ed6acLhJFuehD6CDTR3di/SkJ0gfo8FRIPtSsocgAY wZtwiidAoSHgX3p/NKg8iku9V5iFUCbBci0yHbyrdqusfYRn0yXpeTQplDMbgY92ctXl8DTCaMrmg bIY01P5OV3fRFtlofvsUiew+w3RPWGo8yXvNefwY6LXoZD2nHJYc6NoNRouWN/1QyYa4Xj34HbghZ DHC1MNhs1AqfdWxY3UdHtf55GWsP8Ora8gaLrm/dmhhgcT1vP4ph8DJ7H13rGo7Z1hvu919zHaIm7 9ctbd190gjPcstyfdaBMEm0h28XyvKw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fNKIL-00057J-0H; Mon, 28 May 2018 15:42:49 +0000 Received: from mout.kundenserver.de ([212.227.17.13]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fNKIH-00054l-GF for linux-arm-kernel@lists.infradead.org; Mon, 28 May 2018 15:42:47 +0000 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.145]) with ESMTPA (Nemesis) id 0LpwXf-1g0nyb0ILv-00fmto; Mon, 28 May 2018 17:42:30 +0200 From: Arnd Bergmann To: Will Deacon , Mark Rutland Subject: [PATCH] drivers/bus: arm-cci: fix build warnings Date: Mon, 28 May 2018 17:41:47 +0200 Message-Id: <20180528154228.2403116-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K1:/yx/1QOlx3ewRLu25nrvKZ/qIEMBSypbAZ4ESfUals4FDe6mk4N 2uoBGNIqHr9CHAU/4jbZQG5Ap5otXgfW/2XdkdGPVQoQuaiyYpJeU6F3iHA4rJPIh1cLWS9 Aq9BtM51pkJwSnZEZ4D2oga1JY0Zp2iJW11ICYHSQJhk14KH7OjpUik4Upo9o1wKaf9fUOh csUKDEPrOAxzoYTgVrySw== X-UI-Out-Filterresults: notjunk:1; V01:K0:vJ4r2fWp9aY=:XT5pfWNQXud8CanLSF26Fa /8rTkzxGxqHfUbH2fixPVmjpW+x85hpUGk7wAGc/iNWRy2gxnQe349OqUtR0645P/AqmUbTB1 MFKjzDTsLxOEWRac8MKYAmgDEqlU1W3gT7WIXbrsRBDgVBx+vf0GRMkGj19V4s3SaIWyy0d6T SckEvJWEEVBvAPDFG4zS/U7RNqEqGFY/VfsyF/uXuxUqA/yXe6+WPKRyoXm0WmxlDMMxOPMon Suse2A8MSpJsrf45kIdEX1K1B4p8TxOXh7Kv6QF/LsVYpJqj9DCGCzi5iF48IpmUy/f+OcdDc J1cPTj4mGFd9BlE7RI/JsPQqEAIdmPhI8d12j7RhWvc9pnHEEbMsRPkcx5NxlEIQtRjQhuGLx 5Tu/UwdVyl86PZuZOa3ZCwb1npfg3hQhjIsD/43z7fXzUsfMXss8Izr3r7rq+U37PheS4XmhY 5bNfDplhg0flxqoKP7cPhdB4iYSyYuLvx+ZsazOgSxlg7R3p0VrA6/pXdR4CqTN72c6EDP/sY qWRnxlePQaAC7putdHX3xKA6WZn8vRoXOR37VwH7BRUaZ035zBA06WYa7VxxdYKAtNgqNDzfF DYD8ycSAgZCP/MXC2PWTD/0ttlIiM6M/Y0c8tcJIXDP5o9UrlyY8+fuybmTscIeGXVL5sJe0D q1Idy3YhXBJeuS0x2jDLWohPMlvGBCLmEQ8ENOzk0RgA2Fa4wz32WCPaJz2UT9g45CTs= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180528_084245_838713_9122A153 X-CRM114-Status: GOOD ( 14.26 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rob Herring , Arnd Bergmann , Marc Zyngier , Punit Agrawal , linux-kernel@vger.kernel.org, Robin Murphy , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP When the arm-cci driver is enabled, but both CONFIG_ARM_CCI5xx_PMU and CONFIG_ARM_CCI400_PMU are not, we get a warning about how parts of the driver are never used: drivers/perf/arm-cci.c:1454:29: error: 'cci_pmu_models' defined but not used [-Werror=unused-variable] drivers/perf/arm-cci.c:693:16: error: 'cci_pmu_event_show' defined but not used [-Werror=unused-function] drivers/perf/arm-cci.c:685:16: error: 'cci_pmu_format_show' defined but not used [-Werror=unused-function] Marking all three functions as __maybe_unused avoids the warnings in randconfig builds. I'm doing this lacking any ideas for a better fix. Fixes: 3de6be7a3dd8 ("drivers/bus: Split Arm CCI driver") Signed-off-by: Arnd Bergmann Reviewed-by: Robin Murphy --- drivers/perf/arm-cci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/perf/arm-cci.c b/drivers/perf/arm-cci.c index e6fadc8e1178..0d09d8e669cd 100644 --- a/drivers/perf/arm-cci.c +++ b/drivers/perf/arm-cci.c @@ -120,9 +120,9 @@ enum cci_models { static void pmu_write_counters(struct cci_pmu *cci_pmu, unsigned long *mask); -static ssize_t cci_pmu_format_show(struct device *dev, +static ssize_t __maybe_unused cci_pmu_format_show(struct device *dev, struct device_attribute *attr, char *buf); -static ssize_t cci_pmu_event_show(struct device *dev, +static ssize_t __maybe_unused cci_pmu_event_show(struct device *dev, struct device_attribute *attr, char *buf); #define CCI_EXT_ATTR_ENTRY(_name, _func, _config) \ @@ -1451,7 +1451,7 @@ static int cci_pmu_offline_cpu(unsigned int cpu) return 0; } -static struct cci_pmu_model cci_pmu_models[] = { +static __maybe_unused struct cci_pmu_model cci_pmu_models[] = { #ifdef CONFIG_ARM_CCI400_PMU [CCI400_R0] = { .name = "CCI_400",