Received: by 10.223.164.221 with SMTP id h29csp1098639wrb; Wed, 11 Oct 2017 15:21:13 -0700 (PDT) X-Google-Smtp-Source: AOwi7QCZ1uPZN38NbbcANFYaveyPCawlRsJz5ZR+EYNPTwrUUcBu+9jEpoSMe4Sca3Wg/vuyImqM X-Received: by 10.84.217.201 with SMTP id d9mr395744plj.0.1507760473429; Wed, 11 Oct 2017 15:21:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507760473; cv=none; d=google.com; s=arc-20160816; b=cOW9Ne+YTR6g16Q4YMI7krAdtUMMg06HLXa/49C8xIyot6qiOy6gpLMN/l5uewJrBS yMeKJmg774bUFwUAYHsQ8LJXhk1ui/cIA2QtM7G158DP9UlzWtVjzQ6PrtaldEi9g6Wi lP1r1xsCs01ym7qZ0PipTUdaUDII8qObhNwu7td3Vo+YIpcRlza0cUZoFx7oxT43c4x2 F+2DyEBlAbSrFKtPHB0uvIuEe7t7jvlOUT0Orh8ubDPaIE6XneP5vM832sbFFnfbsBPf Vnjp8E2+1T6ACNqH6Xe9n+Qy9fHCT799wI0Sv8yA7NLFOdd2z40dopaUCXjeWAWozwWL +Umw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :dlp-reaction:dlp-version:dlp-product:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:arc-authentication-results; bh=AQ43AlEGGD1Cy08wE6KtE/HjxAl44ayeyJiSDAZ1jqk=; b=J1i4TnOhxufSMgXdfz6IEtqYwnUND5buC0ZzOIOSRWyakDlJhLFUYwIx1CtR2oZRyX TyTKQ8sEDCzAaRgoq7cj+xfZKYyyEoySJ2oXt06yGvv87X5pxkN88J4KgvqX2SJAKoDH iB1IlvLT9SZmHu7fMTi4Iq+le+JRJ7tquoLEfYXA5y/0ao96yVkHuTC89weiATJ/TjC+ dfgF/RD9mP2Dr2sFwENbsoaR3oihcBr+CdYT+MS18bAF34sDi042Bh5Nv6+FJDKehuBT JjFn0k63wjBxLUeA0YmkEJaXIyF9DM52qXt2v1hKk2ELuyqMLPEVOooiKEWsFsFuJySP QX3g== 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 b6si1447393pgs.396.2017.10.11.15.20.59; Wed, 11 Oct 2017 15:21: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 S1752813AbdJKWUX convert rfc822-to-8bit (ORCPT + 99 others); Wed, 11 Oct 2017 18:20:23 -0400 Received: from mga07.intel.com ([134.134.136.100]:38813 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751285AbdJKWUT (ORCPT ); Wed, 11 Oct 2017 18:20:19 -0400 Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP; 11 Oct 2017 15:20:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.43,362,1503385200"; d="scan'208";a="322220876" Received: from orsmsx105.amr.corp.intel.com ([10.22.225.132]) by fmsmga004.fm.intel.com with ESMTP; 11 Oct 2017 15:20:18 -0700 Received: from orsmsx111.amr.corp.intel.com (10.22.240.12) by ORSMSX105.amr.corp.intel.com (10.22.225.132) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 11 Oct 2017 15:20:17 -0700 Received: from orsmsx115.amr.corp.intel.com ([169.254.4.2]) by ORSMSX111.amr.corp.intel.com ([169.254.12.55]) with mapi id 14.03.0319.002; Wed, 11 Oct 2017 15:20:17 -0700 From: "Keller, Jacob E" To: Arnd Bergmann , "Kirsher, Jeffrey T" CC: "Kwan, Ngai-mint" , "David S. Miller" , Florian Westphal , "intel-wired-lan@lists.osuosl.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH] fm10k: mark PM functions as __maybe_unused Thread-Topic: [PATCH] fm10k: mark PM functions as __maybe_unused Thread-Index: AQHTQpkT/kQexjBmEkSS4Y9L+/CMy6LfOOfw Date: Wed, 11 Oct 2017 22:20:16 +0000 Message-ID: <02874ECE860811409154E81DA85FBB5882AC474E@ORSMSX115.amr.corp.intel.com> References: <20171011135834.3628155-1-arnd@arndb.de> In-Reply-To: <20171011135834.3628155-1-arnd@arndb.de> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOTgzMjE1OTgtZWExMS00MjU3LTg5MWUtOWFkMDhiNzc1MDY1IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6InNVNm9mUHlMUjA0cDloaGkxRlp5SllhdXVTbDY1Z1ZxV1VpNnVXVzZPcWc9In0= x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.22.254.139] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: Arnd Bergmann [mailto:arnd@arndb.de] > Sent: Wednesday, October 11, 2017 6:58 AM > To: Kirsher, Jeffrey T > Cc: Arnd Bergmann ; Keller, Jacob E > ; Kwan, Ngai-mint ; > 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 > > 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. > Acked-by: Jacob Keller > 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(-) > > 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 > }; > -- > 2.9.0 From 1580969905149816977@xxx Wed Oct 11 13:59:53 +0000 2017 X-GM-THRID: 1580969905149816977 X-Gmail-Labels: Inbox,Category Forums