From patchwork Thu Mar 15 16:18:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10285129 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 48D286061F for ; Thu, 15 Mar 2018 16:20:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3A32F28B56 for ; Thu, 15 Mar 2018 16:20:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2C46228B61; Thu, 15 Mar 2018 16:20:55 +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=unavailable 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 B725328B56 for ; Thu, 15 Mar 2018 16:20:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751897AbeCOQTL (ORCPT ); Thu, 15 Mar 2018 12:19:11 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:55577 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751699AbeCOQTJ (ORCPT ); Thu, 15 Mar 2018 12:19:09 -0400 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue002 [212.227.15.129]) with ESMTPA (Nemesis) id 0LoMri-1eOnbI2V0k-00gasi; Thu, 15 Mar 2018 17:19:02 +0100 From: Arnd Bergmann To: Thierry Reding , Lorenzo Pieralisi , Bjorn Helgaas , Jonathan Hunter Cc: Arnd Bergmann , Manikanta Maddireddy , Stephen Warren , Vidya Sagar , linux-tegra@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] PCI: tegra: mark PM functions as __maybe_unused Date: Thu, 15 Mar 2018 17:18:39 +0100 Message-Id: <20180315161901.772729-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:FwSW0MpuubBCFsr8R6uT50AgdYR5VWAITzNF/CN0EhalEH9JX66 RYBGQSwkDwSQnhzt4vofAW/o20RvfFoFOed0KxRr7jUqYzebCpwD/HP52HXvW5Ihu5suRS2 BjBq1En9YEDKO+iUVFH5BzzV7KWP3R6r4uy2tFqRl0ttVMeyZ1uRluTE7L0xkvYYuuIbiu0 Myx2cPDxwKgrT3JZ/8xwQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:fXrB6xAZBN0=:hL1jTtC84nZfq2c2LzYyh6 yjbfyNRL46WSO/5FN7yLYLxGuaewviGg1EztzlxxQ5DzPyIaJZBtgq/WoxED9kDkj9iLr6Gx0 6WtKYmhezhnX5EaGzhSIHiAjPmrOd5kpXBAf0tK/2SdeLME7aLgw0pydeituOPunpn9lpNFKC HhswUPXzacui8LTp+D9HOiKZFRZSRHCj6ZGpn29jiaw3q1XLmFxxTJb+ZWugC4PsBSuUqf6tV HtcXYNVFLdDgwMf6OxQN1GT4eZ1BcEDTFx2L4CP/9krKiYE1BaAbutE/QudJNP1nl3BQEvEan WNKaleJhrZYX3XlTNABxPcy27elip6F1ry65wVvn5tTPdlZqFDffhQpYtF9Mze3GW14h8wght LuhC/5Ubqnpyb/9ipnWSOSOnRjxDwdDWfY3l993XjiW92WYSyVlZjkNCvOg3E6kCmtLRdzGsw dIKfgF2gXz8ilzQDcFb0V2F0ljr7trq6aGFWEYx1YAE0L1e826aOWmOvSbL3E5YSFv017imy0 7MhJWDsCKFcs23xUioqKal6HPWtc9+o4Ws5Mo6UQHBG2muBmWWzJ7hxCKoVkW2DQFjegck6wm 8Upvo6JrgCeOaL3nV+/LwuG523kUvkyhxNWbP4n9f15o9Leu/2to8Hl95lbhtxaoxCj65EaS6 4zOSdCB5Dm4BB15pWzmZRQr2ls+AYhiSoidg9weYMIus8d3aIXTYWub/4Mys+qHnQQXH/rEFk wKyV6xjJSmN/BYvXceW5JHpLeD3WPI7M2bGFDQ== 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 The new PM support causes a warning when CONFIG_PM is disabled: drivers/pci/host/pci-tegra.c:2482:12: error: 'tegra_pcie_pm_resume' defined but not used [-Werror=unused-function] static int tegra_pcie_pm_resume(struct device *dev) drivers/pci/host/pci-tegra.c:2463:12: error: 'tegra_pcie_pm_suspend' defined but not used [-Werror=unused-function] static int tegra_pcie_pm_suspend(struct device *dev) Marking the functions as __maybe_unused lets the compiler drop them silently instead. Fixes: b90b44154023 ("PCI: tegra: Add power management support") Signed-off-by: Arnd Bergmann Acked-by: Thierry Reding --- drivers/pci/host/pci-tegra.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c index 39c4af9cf055..389e74be846c 100644 --- a/drivers/pci/host/pci-tegra.c +++ b/drivers/pci/host/pci-tegra.c @@ -2460,7 +2460,7 @@ static int tegra_pcie_remove(struct platform_device *pdev) return 0; } -static int tegra_pcie_pm_suspend(struct device *dev) +static int __maybe_unused tegra_pcie_pm_suspend(struct device *dev) { struct tegra_pcie *pcie = dev_get_drvdata(dev); struct tegra_pcie_port *port; @@ -2479,7 +2479,7 @@ static int tegra_pcie_pm_suspend(struct device *dev) return 0; } -static int tegra_pcie_pm_resume(struct device *dev) +static int __maybe_unused tegra_pcie_pm_resume(struct device *dev) { struct tegra_pcie *pcie = dev_get_drvdata(dev); int err;