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: 115555 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp791555qgn; Wed, 11 Oct 2017 06:59:01 -0700 (PDT) X-Google-Smtp-Source: AOwi7QBP/rtTO7mQ23VyqrXb2RJ06/dDmA2X+4fOq+RoBvpNYG6fLTL9HXfcBRvF/50MeMWaztWK X-Received: by 10.84.217.201 with SMTP id d9mr15292133plj.0.1507730341418; Wed, 11 Oct 2017 06:59:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507730341; cv=none; d=google.com; s=arc-20160816; b=iOUZk8LHgqU9bv9jfcvqijB3cPJDNnCXgrF2OKQ/b+8i1QEqvXJ0v3Rlh3UxUFfWzh pfSzR8JsQkTkg5Tu3dbXqCfmcAF1zotNRRne8GZei27zVWRZCFAeWg4enIUu+lGVUem4 UF6rWETvgXD1mUwoadM4EznR7opQnlGZflM489HXogQplFe+lzlGAp4XbHh2QgXE6Xq3 DW+QAozJDrU9Iq/XZDIDkOYVbAQkfyAMcTldg6Re30+fWIJ2rihs3tDJEOFR65csf3xY fZBnWS2JQSsavsjtm59axDbJYbeipL7ZKrPkK24brBIZo2iJS1KVyjkB2RCd2sJoQQmf mTLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=tnPSnnvlhCrbnByd6Y8wSxTCjGA+Ca0550e4PjMoNsE=; b=WDvI+rfz409/Bdf8Hv2TIYm24ln7cZk625P8KAy4J1zNs/ETPExZXoLHzBR95H1VpR To+2Ki/cycvFKQJv8rS8Q3jEA3NwF5jyYnYYMTpEPXNEdm+gVyM2tgyCNyrmRDy/yjY0 QgYQ+I+moyXI4IsfVpbcULfwluJEvQfgYCz8h2mFOhiEAuQXbowavPdtYp0KjQ2iLZ6k gcJs1rRxCW+mLwxFVdNjNumGEkL95m7DMNqUaByIN0e0IREG2whFfZ0AUiTmPmLWtSpU j4onEMEuf3eXwrQqwg1XrlJ3khR/473Wda+dhU78415Zu2aag1rB+RZHIuhsbIGFB88Q ckhA== 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 u7si11013888pfd.80.2017.10.11.06.59.01; Wed, 11 Oct 2017 06:59: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 S1757735AbdJKN66 (ORCPT + 27 others); Wed, 11 Oct 2017 09:58:58 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:58924 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752724AbdJKN6z (ORCPT ); Wed, 11 Oct 2017 09:58:55 -0400 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 Cc: Arnd Bergmann , Jacob Keller , Ngai-Mint Kwan , "David S. Miller" , Florian Westphal , intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] fm10k: mark PM functions as __maybe_unused 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== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) -- 2.9.0 Tested-by: Krishneil Singh 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 };