From patchwork Wed Jan 17 15:57:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Kirsher X-Patchwork-Id: 124821 Delivered-To: patch@linaro.org Received: by 10.46.62.1 with SMTP id l1csp91705lja; Wed, 17 Jan 2018 07:58:01 -0800 (PST) X-Google-Smtp-Source: ACJfBosmXA2bHeTYUFoJ07KmpLuL0MZ9JXHUJuDaAaYaQTGC37r9iDMzRAuzL3SsRa6g+LiFZFji X-Received: by 10.98.156.143 with SMTP id u15mr16519669pfk.170.1516204681127; Wed, 17 Jan 2018 07:58:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516204681; cv=none; d=google.com; s=arc-20160816; b=SEnpIvLbFa1Z3DtiggWNjtdGxjM7MePloe0Vmkb/d82Xrjwo8KJxVFNLr962eFSD60 7u0msLKg9PSMTS/HRHms528RViWNuzrhV3JWNZbEI1mca6vF40vYkPMMY1TsGQjlFCWX fd8/N2AmcOePAAsui/w3bzBgTcMWpRaqxQMNve0abSUucrxrmUcHvUw8NfWO2OP8HDrt c8YwuSSlgIppIUfGLy/I/myExYg5XJz5McA0G8UbqnxwcnBgETD/Wo/f6PLz0NIURVAu Fg0/VHCzwV0A97pceuX/RhG+k/3xfoZ71DPQ39e/3w6RkGSpiIsf/IeOAjoKXtBeAgOW U1Hg== 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=PddL4qJROFtA34vPr9J4QkWo2iiKaObqvL8fehDg2vc=; b=aHxQdgklSmog2Cu9uSTWesEM8pkfVst/q4ujxd+LfRfKbkl2o9Ic7XXK7vtCbX/tvz Zj3CMEk9DWhOts+uMyAQhxE1FG9cIGNCAr+/VGu3KYEhHJ/00pSCTUJqrmL2YtQE/KLO R15mzseRRW2v21z8jk/33yml4jrhG5dDYLBJOXuudNjMyjJb7qP2Y9f2LVGeA8kKtPCd Uv+RyLDuTqBqmJOKjnYSX1W3pFY10u2HJnsNGQDiyEW3XnBTbBBpqHu+ZFtwslfK0wiG 0W1LV7fdbUZ8zZcixcNZCJ5CuYrJW8PjuHaUkwguQNfl5FvPW4MLhYwN8zzDGOjkhRNS p8ZQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-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 b20si4118340pgn.655.2018.01.17.07.58.00; Wed, 17 Jan 2018 07:58:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of netdev-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 netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753533AbeAQP55 (ORCPT + 7 others); Wed, 17 Jan 2018 10:57:57 -0500 Received: from mga09.intel.com ([134.134.136.24]:60548 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753377AbeAQP54 (ORCPT ); Wed, 17 Jan 2018 10:57:56 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Jan 2018 07:57:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,372,1511856000"; d="scan'208";a="27228018" Received: from jtkirshe-desk.jf.intel.com (HELO jtkirshe-DESK.amr.corp.intel.com.com) ([134.134.177.65]) by orsmga002.jf.intel.com with ESMTP; 17 Jan 2018 07:57:56 -0800 From: Jeff Kirsher To: davem@davemloft.net Cc: Arnd Bergmann , netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com, jogreene@redhat.com, Jeff Kirsher Subject: [net] fm10k: mark PM functions as __maybe_unused Date: Wed, 17 Jan 2018 07:57:32 -0800 Message-Id: <20180117155732.7289-1-jeffrey.t.kirsher@intel.com> X-Mailer: git-send-email 2.15.1 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Arnd Bergmann 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 Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) -- 2.15.1 diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c index 7f605221a686..a434fecfdfeb 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 };