From patchwork Fri Jan 20 16:24:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9528917 X-Patchwork-Delegate: bhelgaas@google.com 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 BAAFE60434 for ; Fri, 20 Jan 2017 16:25:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9941428684 for ; Fri, 20 Jan 2017 16:25:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8E0C62868C; Fri, 20 Jan 2017 16:25:48 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2008928684 for ; Fri, 20 Jan 2017 16:25:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752611AbdATQZq (ORCPT ); Fri, 20 Jan 2017 11:25:46 -0500 Received: from mout.kundenserver.de ([212.227.126.135]:50954 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752585AbdATQZq (ORCPT ); Fri, 20 Jan 2017 11:25:46 -0500 Received: from wuerfel.lan ([78.43.21.235]) by mrelayeu.kundenserver.de (mreue002 [212.227.15.129]) with ESMTPA (Nemesis) id 0Lj9fL-1byZZ33pWR-00dYmA; Fri, 20 Jan 2017 17:24:55 +0100 From: Arnd Bergmann To: Bjorn Helgaas Cc: Arnd Bergmann , Shawn Lin , Wenrui Li , Heiko Stuebner , Brian Norris , linux-pci@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] PCI: rockchip: mark PM functions as __maybe_unused Date: Fri, 20 Jan 2017 17:24:30 +0100 Message-Id: <20170120162450.3690225-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:3JemHGQy0Bh+HTrRdqdtC+mIRvW9mC84H3qneidup1yTXExoxRM ewC3ypLtzX9lrnaEN/+lHkPF4X1SQhmHOACZc3VsL14+VovaU7O1gHGDsVcSEuNkCrmoN0b C3DGDF/uuuf9q+gLsWq7RoEDaE8VGe/melNkDI8cxilpWT/pIFLg+TFBFYk1jGYa6wm4Xeq Gyzzm9cy5or0Tg1YyDXyg== X-UI-Out-Filterresults: notjunk:1; V01:K0:KCZ2j4lCMio=:owyPvz+fEfs5ods02yLMfU G6Z9V8JyRsSuEXvJegY0vxSOwKEt5/MWnv7d39wJMlPcDYkQy2RR7nk+rvYG66uA4l95SVkop MgWYJsx8RnhJee+Offo0Eb3hnlC8FiGEX0tE6z2X0nDpmFL3IItDjWVYXWkjlA8U90y0oclG5 UDwaoPN1dn6NYnMEwXc+THEDD6BVQMUfMYUWOVS4PNmDXklXxV0xNarWukbczZetKVYTyLyBI cJOQddmncYERuC4g9xT0Iuj0ERgk2NGx/6+6IbBVDHiDhHIzy3MloAiR4ecWTOa4LHtK8Vzn7 VbxsBHazRu9z1CAsHb1ffncEShZQKDFIE8FduasX86X0XgpAWAuVp4qTWWPvkQbN7Ooah8WTv y4db/fDdIqmj3LJspMvss27T+mNz4v1DtAKOWb0mOsGFj9oIiPa8n4kiUwO1RBm7r4dlIpbfa JUk8l6PrqwGtpIWcJe80oz/uqURbTJY/LKo5jcn/fJSvk4s8E0Tax4Wb4d/pBFnl+VK4qluyV mwxqXdMyTFaThgMC84t+iFDpRWe7SQwfoijhiOSQPYGdJxSv3rulwTmcEH4ZAmiviK93vUp0B yCdk65xQ9nJPB6lq41Rd89XG/ecwbJwmIa8AKUqZ1yCYEQRRttIVtlxLGMMseVCWcNtprGbKo zKdRhqC2g6Yh9sSL41U3pu1Gvn6Sw4D8Y/nF2VZk7onJkXGQT7gBm4uOQZKQE0YaTymQ= Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When CONFIG_PM_SLEEP is disabled, we get harmless build warnings: host/pcie-rockchip.c:1267:12: error: 'rockchip_pcie_resume_noirq' defined but not used [-Werror=unused-function] host/pcie-rockchip.c:1240:12: error: 'rockchip_pcie_suspend_noirq' defined but not used [-Werror=unused-function] Marking both functions as __maybe_unused avoids the warning without the need for #ifdef around them. Fixes: 013dd3d5e183 ("PCI: rockchip: Add system PM support") Signed-off-by: Arnd Bergmann Acked-by: Shawn Lin --- drivers/pci/host/pcie-rockchip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pci/host/pcie-rockchip.c b/drivers/pci/host/pcie-rockchip.c index 0d6e8ee5b017..b975116d2b03 100644 --- a/drivers/pci/host/pcie-rockchip.c +++ b/drivers/pci/host/pcie-rockchip.c @@ -1237,7 +1237,7 @@ static int rockchip_pcie_wait_l2(struct rockchip_pcie *rockchip) return 0; } -static int rockchip_pcie_suspend_noirq(struct device *dev) +static int __maybe_unused rockchip_pcie_suspend_noirq(struct device *dev) { struct rockchip_pcie *rockchip = dev_get_drvdata(dev); int ret; @@ -1264,7 +1264,7 @@ static int rockchip_pcie_suspend_noirq(struct device *dev) return ret; } -static int rockchip_pcie_resume_noirq(struct device *dev) +static int __maybe_unused rockchip_pcie_resume_noirq(struct device *dev) { struct rockchip_pcie *rockchip = dev_get_drvdata(dev); int err;