From patchwork Tue Jan 16 09:14:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 124629 Delivered-To: patch@linaro.org Received: by 10.46.64.148 with SMTP id r20csp946562lje; Tue, 16 Jan 2018 01:14:56 -0800 (PST) X-Google-Smtp-Source: ACJfBou2BLkMybzkIuXh9wJDLwGy3+Ac/O6ZhNKqFSz3CU9FZqzvhqokVz7qVR7vNPg6rE9JTGbr X-Received: by 10.159.252.4 with SMTP id n4mr16875083pls.195.1516094096218; Tue, 16 Jan 2018 01:14:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516094096; cv=none; d=google.com; s=arc-20160816; b=gn/r5+mnq9bqooCF+nE+6RbnembvKGFBhyPR9odQC9hJvgj8i422pZ/c7lk7FyZxVe 6TlUS3ue7nwJUTITpRDfoDVhucNOh1slIse0LIOU+bfvaEcLyr53PmL6RjHsBfETnpOP xh9w+sRKjz3KXI+dYCQRe/UD+wpKxRBUfJBf/PPUnZFiEOJ4+Y7JJ8NEBK6DtMxo+CYW n9SMjfuJJ5qJIQhSBOjtAowQTCxeq9Zyr+yjHVotTexv+qBpwbCrPthvMgV1kQvSZe4g v/DfbjDX5FrgKVGjoFVZGozlWMQehQ/2gCNs43Bm3M8YsayybYSvIDoeC8ol+cOBWUAG ZXxQ== 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=rGxTAZv5DDoJhJ65tqCkfw+JIuUVH/SCHW1mO9z3PRA=; b=Ml7YprlQZ9t6KwN9zAKkgYR661xFxPUYvj17Hir2FRoSEapvLanIuBlqhLUy/Tn0UO QxcB1JFK14V3qQi8xA8RvszESzUY+1unIn7TREpJWz3z2wnMalUKovmIE4FtXk1KoDi4 0xREKZjuy8wA7DN86e01c31/g53Qz6d+55g0E4FPX5ryDwI4ofvxLbH2Zji578onk80A l8GGWW7e6BeECfwoRhUMmLEgiMi2adaeIwNXLODy0t8Oxk8jBgCbhk5VtPXTJ+9aL3/G gY/vW4YccO8Ahpv+JJqex0gxLOKkAbURkwJKnDpAdiDBeH4sSJZUPvvv+1KyL2MBNE0t zVNA== 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 u16si163276pfl.262.2018.01.16.01.14.55; Tue, 16 Jan 2018 01:14:56 -0800 (PST) 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 S1751304AbeAPJOx (ORCPT + 28 others); Tue, 16 Jan 2018 04:14:53 -0500 Received: from mout.kundenserver.de ([212.227.17.13]:58676 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750716AbeAPJOv (ORCPT ); Tue, 16 Jan 2018 04:14:51 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.145]) with ESMTPA (Nemesis) id 0MSrrB-1eRAgy2CDV-00RmU5; Tue, 16 Jan 2018 10:14:37 +0100 From: Arnd Bergmann To: Jeff Kirsher Cc: Arnd Bergmann , Jacob Keller , "David S. Miller" , Ngai-Mint Kwan , intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] [RESEND net] fm10k: mark PM functions as __maybe_unused Date: Tue, 16 Jan 2018 10:14:17 +0100 Message-Id: <20180116091433.2535569-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:vhOul67BL7W/9lJzZTCEVjpVaNFqpCUUGWdWjqtqkTHWsrt2ZnJ m1uqYfFxe44oseqX2nrHZ0Qt/jAIPehgpLI8G/3Dc52ckBDAL/RuAwOccBG2XT3KvKXPtOT tlWHmGc1wfma226laYkvUAz5iAagpMw1zOzpdtc4R5jcPVvvWd4J9WDiYWczu6H3w56Q4p3 qao3/bS49nnIZosGqCb9g== X-UI-Out-Filterresults: notjunk:1; V01:K0:Jv4SlrkaYHo=:kCDtRNu+4whY9zKLFSr5ew qVVeTLes3A7RrkTHZtJ+at1IOC4O9iI+CP3MpShyZnqUZhIASBwYUO3C+EnAqXOvu/1f7tppV IvV1gcahLNIzRvM/SWF7KXR/axIgF9q8G8yEkIyukT5vvMakLWl08YLFo0RiTNWHAi6IB6lBx DHDYV17MoqDjpFtAbwwToDqYAuVq7lBhhIfrazgCoLgXJR6l4ptAnrqsGRF3OGn53yOCRfzBe zau6At8Bf9Tttv8B/50xtN4QYgmS6dYIFhdhlcPBPfqkM+67WTHe3DK41n1ZyEc9ZiEG8F9Ba t41fLGZppnOESS3Re+rGO3w2fevGI18susKucVOYFo7h+Y3k33wjFa6HYAq70rR0hH53oTD0k 3lBSgvSkoeJJujm5chSSirN3+bKI/VLL8kkYK5ucSARAGS1WhcTDuLvEyHH7nJBeyGRYl3MO0 jzaXnUkgK1B9+bXg/8f76TegrJeyRdGtXTAQ66kcSJ18yWOalaBWHqnW9J3r627lwr2YDm8zj 6ANW0BFJZYXX8mCbMqkjHZoFgXlpUXIHnFUwcMbjjs6zIIwZgxhOJNku1zw8x+lFZbsSpxTBm AqpOup0vnn07WSs7Xm8UySdCPu+4yQnVegcOVNTE80DNzy/NhCPZ6PxU2yLLEZWsIlokSp9Vs RNnX32ap+3sVqKWgBYjE/tB0z0V3AzFsEU24dz3RmjKdjPSuZ/KpEefdvmvyYKMIzTWGNfDMd M9KnrGghGW7gMvUsSPdXilzKiYhpRBdkSOs2Qg== 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") Acked-by: Jacob Keller Tested-by: Krishneil Singh Signed-off-by: Arnd Bergmann --- Apparently nobody picked this up the first time around (Oct 2017), here is the same patch again. --- drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) -- 2.9.0 Acked-by: Jacob Keller 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 };