From patchwork Wed Oct 11 13:58:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 824430 X-Patchwork-Delegate: jeffrey.t.kirsher@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=osuosl.org (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=) Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yBwZH6R8Rz9s83 for ; Thu, 12 Oct 2017 00:59:03 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id B5ED02FAE1; Wed, 11 Oct 2017 13:59:01 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eAXtboD+umJs; Wed, 11 Oct 2017 13:59:00 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id D123A2FA97; Wed, 11 Oct 2017 13:59:00 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 11C861C09DE for ; Wed, 11 Oct 2017 13:59:00 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 98A7D82593 for ; Wed, 11 Oct 2017 13:58:59 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zLjrxz5DSuOz for ; Wed, 11 Oct 2017 13:58:58 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.134]) by whitealder.osuosl.org (Postfix) with ESMTPS id 58B4D82365 for ; Wed, 11 Oct 2017 13:58:58 +0000 (UTC) Received: from wuerfel.lan ([95.208.190.237]) by mrelayeu.kundenserver.de (mreue006 [212.227.15.129]) with ESMTPA (Nemesis) id 0LnpfA-1dMeBj1jey-00fx05; Wed, 11 Oct 2017 15:58:39 +0200 From: Arnd Bergmann To: Jeff Kirsher Date: Wed, 11 Oct 2017 15:58:22 +0200 Message-Id: <20171011135834.3628155-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:pomLevAo/euNTGlctXH8ACFSr7t+axpxG29WUZUvI8/20VlYvN6 9gQSvd35F2E5fL/E7S8/XkHUoaOqnVrM66T3lRoONU0B/E52GSs7aZ6sNP6MFB28OtqInrx ihJze1O1NJLHMXKxWOd4H/L8ciaKx+XxW4pofUlXZGL67ftN4zfeW4iXSnlLW2BgULR/ISF z5tFRH51Yfa0sWdX4g6CA== X-UI-Out-Filterresults: notjunk:1; V01:K0:BOO+g973mJ0=:B/Kj5XN65ljK83ipsi6Z4q p9qnIh1FyaUn+yeu5/KXq9V3LXJRDAUlq1i4qMnXnDIDnbtRxNhA+9GJX1nyqca/GHMKsTsO+ lBWfF2klXKma0qvvSXd0oqwNsBYaqxwJDFfc3enf/ArGM38g4H4/kk3+JNqnrEzmYdEoR+awz QxTEVmPiKzcxE3+WODhb+D4SaFNtkIT+lpZTX5+YaYJLHug2UXNsMksyZYyzPfK/YnHEIB6Oj 1Vkr8fE6jF7k1HJ4F8k1JHf8h4frjz1zMqGIx7NXAygy8ePWSOaf0gTRNRU71WzyrWHHhzAkr 2lF/nY3gjz+jmCWOH2gLR8pds6L/VyZbWRMnioSvS0Ivt/f23xLVwiKX3iuAooQKCMGeS2C0a PQxQ0K8seQG4LDwyyMPbdsorrlr/praFdwS9ISvUIrQq+Ql5UNJcLcdrybSxLPKeCGlFRbCn/ VfVuKUHitSwu0eHWvmpGctYsryj2H0WuTo8hHilj83UImA8fEC/JV8vUzCiUOJ5YX5SG5Oe46 LxWLHSL6tDWSbcrk3W921KiUyQlm+6EDPSLAuHFhsjHrwlH594qn67wLzkTfpOXsn8spCKKxy rJ9ZH3o4JYT34Yb33XLbWt9naEQPR6HYiudX6fIlauoIGqio4dZAu1z9+mUr9IDaWaky79rM6 WOE00cxDU7rYfmH6g/IU+Qo2eqpjHUQrd2EE7PK7BLd6sMP5IM9UNQ1WX5sM3/jzKzRblGRZS eWAL7Eg9zbTKUN2X42cStSR+TOgr89wFPZvi5A== Cc: Arnd Bergmann , Ngai-Mint Kwan , netdev@vger.kernel.org, Florian Westphal , linux-kernel@vger.kernel.org, intel-wired-lan@lists.osuosl.org, "David S. Miller" Subject: [Intel-wired-lan] [PATCH] fm10k: mark PM functions as __maybe_unused X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" A cleanup of the PM code left an incorrect #ifdef in place, leading to a harmless build warning: drivers/net/ethernet/intel/fm10k/fm10k_pci.c:2502:12: error: 'fm10k_suspend' defined but not used [-Werror=unused-function] drivers/net/ethernet/intel/fm10k/fm10k_pci.c:2475:12: error: 'fm10k_resume' defined but not used [-Werror=unused-function] It's easier to use __maybe_unused attributes here, since you can't pick the wrong one. Fixes: 8249c47c6ba4 ("fm10k: use generic PM hooks instead of legacy PCIe power hooks") Signed-off-by: Arnd Bergmann Acked-by: Jacob Keller Tested-by: Krishneil Singh --- drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c index 1e9ae3197b17..52f8eb3c470e 100644 --- a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c +++ b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c @@ -2463,7 +2463,6 @@ static int fm10k_handle_resume(struct fm10k_intfc *interface) return err; } -#ifdef CONFIG_PM /** * fm10k_resume - Generic PM resume hook * @dev: generic device structure @@ -2472,7 +2471,7 @@ static int fm10k_handle_resume(struct fm10k_intfc *interface) * suspend or hibernation. This function does not need to handle lower PCIe * device state as the stack takes care of that for us. **/ -static int fm10k_resume(struct device *dev) +static int __maybe_unused fm10k_resume(struct device *dev) { struct fm10k_intfc *interface = pci_get_drvdata(to_pci_dev(dev)); struct net_device *netdev = interface->netdev; @@ -2499,7 +2498,7 @@ static int fm10k_resume(struct device *dev) * system suspend or hibernation. This function does not need to handle lower * PCIe device state as the stack takes care of that for us. **/ -static int fm10k_suspend(struct device *dev) +static int __maybe_unused fm10k_suspend(struct device *dev) { struct fm10k_intfc *interface = pci_get_drvdata(to_pci_dev(dev)); struct net_device *netdev = interface->netdev; @@ -2511,8 +2510,6 @@ static int fm10k_suspend(struct device *dev) return 0; } -#endif /* CONFIG_PM */ - /** * fm10k_io_error_detected - called when PCI error is detected * @pdev: Pointer to PCI device @@ -2643,11 +2640,9 @@ static struct pci_driver fm10k_driver = { .id_table = fm10k_pci_tbl, .probe = fm10k_probe, .remove = fm10k_remove, -#ifdef CONFIG_PM .driver = { .pm = &fm10k_pm_ops, }, -#endif /* CONFIG_PM */ .sriov_configure = fm10k_iov_configure, .err_handler = &fm10k_err_handler };