From patchwork Tue Oct 10 08:17:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 115360 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp3482228qgn; Tue, 10 Oct 2017 01:19:13 -0700 (PDT) X-Google-Smtp-Source: AOwi7QBccjt8oMkyS1KtAhOZfwZctC7T9bw5iCvOfVG74lxH8xQwb+R/VRrQmdzToK9ArGtXw/1b X-Received: by 10.84.231.133 with SMTP id g5mr11212715plk.188.1507623553296; Tue, 10 Oct 2017 01:19:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507623553; cv=none; d=google.com; s=arc-20160816; b=G8asfgtrpgIvlbL0gYagWLmOFQpDFFtRpOYTobEwD/581E4QqSoKMoabCIqme6KIZ+ VKKjNFgWlh0aWoRLPpAIaWiU5WQBiwd5A261crJxgfWxYMGO5NLJ2srBNw8lLUbod4Hh Vh48CoWc4e2XM3UqOyOH5NHzvdt8/e4+ssM3yyyy/EP8vmWLD6NMA5qsFiXdDX6xzkVB ZIV4j6AKl12uQqUSKz9HVKbrxj7a/8p8IG+GiyV9S1VWfBJOtVSsksnPumQNzpyAK3hf d9EtXzvJwJHvRG6F0cH+SyU7ij/t3hRtpY4swZ2CMJZIDTMcW4n/6lZDFot2ANbfpDA1 3z/w== 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=3J+RLE1he/0WsNTp+MSW9h1m8CO1LdGs2/m8mnDu/UQ=; b=q4xy6AZ3SQZYrJif7fZX9yVgHJnpGS9xVIpGIeoYEScP3fFzI8KN224F/qm1GDz5pw 8/EOeTpz5IpdlaUfMCQuIZk7IPxoV80eZIdiPXw+5QIjv1OOlS+Hvc9nfBxZQVLktBV3 DdfxaQuOeRJTLpdsUAXpwyjt/u4d7i5e5Ru4+EJkkOXsO+sg4Zg6zGhRvS25dgjZa7z0 GKTRVanFDScSuNw1kYGvdwsY7Vrymi1nm2/vAd7TBqxMlgA3qG+8m+wYxvOlh3KvuO9d cjep98L8tPwnIW7VEErhztAD5QRnltTFr3fHSBxfz5xa4kjv2peYzveZFRERCwPYhJqW Mh/Q== 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 b13si2799561pgu.17.2017.10.10.01.19.13; Tue, 10 Oct 2017 01:19:13 -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 S932199AbdJJITL (ORCPT + 26 others); Tue, 10 Oct 2017 04:19:11 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:61314 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755788AbdJJITJ (ORCPT ); Tue, 10 Oct 2017 04:19:09 -0400 Received: from wuerfel.lan ([95.208.190.237]) by mrelayeu.kundenserver.de (mreue004 [212.227.15.129]) with ESMTPA (Nemesis) id 0MWvbc-1dneuZ3Mc0-00VxXi; Tue, 10 Oct 2017 10:18:55 +0200 From: Arnd Bergmann To: Jeff Kirsher Cc: Arnd Bergmann , Jacob Keller , Mitch Williams , Alexander Duyck , "David S. Miller" , Alan Brady , intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] i40e: mark PM functions as __maybe_unused Date: Tue, 10 Oct 2017 10:17:38 +0200 Message-Id: <20171010081847.4090496-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:8k8t1khesu7P762HJpMxbrZckQaC0ufQa0x1cSh5/DPuPSz+nuM tFsbHiXiXBT74y+F4bNmQOBY7kPUdw/0SDqInJBsxsOAZu8MxMUjRGRxG7M2HDV0Swj/ckR IG4WdLqIruvzAtAmhA9K7bwTOlzdjir47rniG1ZMOj9Zs+x1lEMpq2iKoLlJ9/hA9dghVQU 6u+UN00pQNc7x4aB5Zoig== X-UI-Out-Filterresults: notjunk:1; V01:K0:Mg7ZTLIu2Nw=:+gLyWUvSNgtujaGgQqFPeA KcpgzRMpUKRnVLMufE1KN/tmPfD2ypSbuYBw2LcZS+J0YQFJ0oOBttexoDvMVWFTyQhGsZD3F PsIEvfFKiIPNdZ6NmYIaRTRBcVYmmReYGdoThJJN39r9TPGpgZ61iNnGZ0LPaFqi7yAdtQRj/ S4mDf34K3K3GGltPvetSIffug+Ju/5LMlHqd15O3fqC8mfUrWFGuwmcT6ir/Cl9fI9LbfczKy 9MevkYtmDOfuTcBtpidfzZf2l2GpIqwp7FhbS71DWE0zEoHTEb7BPv4Kivg5VrUHw0MylX6dt FEn4bEt57fstbmu8xrHgVbxgUrjCwUe0teh9I5S1UAmZ1tFKarzwoYReyv8DbLL39k0TtxKen pGLeLjyAZLlEWREEI9MQ9KHntdVJE1LBtMtBm+x4oreGtpqbWNNtWz8Mxuk5QlNQW7O8+5fP3 O2HYLwhhCCM+PzVl7/1dl/3JWJkpHKfOzuuB6+6AygGzvyiZecnS0UaBjFs4UKueA74F/h7Hd diy/rut4vcPKHJvLyMGMYsbT+PWZTtJXtTeyrpVPdTKWVY7ua1KgVhTJ0DPXTsgSwVr2V5no4 EylEM1Cx8T2ZVUrClbaCWZX24o87daixsW85Pjg6pEzlVEnvqRklONTKGixp5Nvnfm4cs7WKj G+AaBMQddqLw+bYi7faAGrMjNBUmDrEsuS3PgI5R2KJffDTeIoliCiHYKLUaPsquXl2atlmAe gKB1wIlNSsPZvrt9vrSFscoeoRYds4y0YCAk0A== 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/i40e/i40e_main.c:12223:12: error: 'i40e_resume' defined but not used [-Werror=unused-function] drivers/net/ethernet/intel/i40e/i40e_main.c:12185:12: error: 'i40e_suspend' 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: 0e5d3da40055 ("i40e: use newer generic PM support instead of legacy PM callbacks") Signed-off-by: Arnd Bergmann --- drivers/net/ethernet/intel/i40e/i40e_main.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) -- 2.9.0 Acked-by: Jacob Keller diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c index 60b11fdeca2d..eb091268bc3c 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c @@ -8370,7 +8370,6 @@ static int i40e_init_interrupt_scheme(struct i40e_pf *pf) return 0; } -#ifdef CONFIG_PM /** * i40e_restore_interrupt_scheme - Restore the interrupt scheme * @pf: private board data structure @@ -8419,7 +8418,6 @@ static int i40e_restore_interrupt_scheme(struct i40e_pf *pf) return err; } -#endif /* CONFIG_PM */ /** * i40e_setup_misc_vector - Setup the misc vector to handle non queue events @@ -12177,12 +12175,11 @@ static void i40e_shutdown(struct pci_dev *pdev) } } -#ifdef CONFIG_PM /** * i40e_suspend - PM callback for moving to D3 * @dev: generic device information structure **/ -static int i40e_suspend(struct device *dev) +static int __maybe_unused i40e_suspend(struct device *dev) { struct pci_dev *pdev = to_pci_dev(dev); struct i40e_pf *pf = pci_get_drvdata(pdev); @@ -12220,7 +12217,7 @@ static int i40e_suspend(struct device *dev) * i40e_resume - PM callback for waking up from D3 * @dev: generic device information structure **/ -static int i40e_resume(struct device *dev) +static int __maybe_unused i40e_resume(struct device *dev) { struct pci_dev *pdev = to_pci_dev(dev); struct i40e_pf *pf = pci_get_drvdata(pdev); @@ -12252,8 +12249,6 @@ static int i40e_resume(struct device *dev) return 0; } -#endif /* CONFIG_PM */ - static const struct pci_error_handlers i40e_err_handler = { .error_detected = i40e_pci_error_detected, .slot_reset = i40e_pci_error_slot_reset, @@ -12269,11 +12264,9 @@ static struct pci_driver i40e_driver = { .id_table = i40e_pci_tbl, .probe = i40e_probe, .remove = i40e_remove, -#ifdef CONFIG_PM .driver = { .pm = &i40e_pm_ops, }, -#endif /* CONFIG_PM */ .shutdown = i40e_shutdown, .err_handler = &i40e_err_handler, .sriov_configure = i40e_pci_sriov_configure,