linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Singh, Krishneil K" <krishneil.k.singh@intel.com>
To: "Keller, Jacob E" <jacob.e.keller@intel.com>,
	Arnd Bergmann <arnd@arndb.de>,
	"Kirsher, Jeffrey T" <jeffrey.t.kirsher@intel.com>
Cc: "Kwan, Ngai-mint" <ngai-mint.kwan@intel.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Florian Westphal <fw@strlen.de>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"intel-wired-lan@lists.osuosl.org"
	<intel-wired-lan@lists.osuosl.org>,
	"David S. Miller" <davem@davemloft.net>
Subject: RE: [Intel-wired-lan] [PATCH] fm10k: mark PM functions as __maybe_unused
Date: Tue, 28 Nov 2017 18:51:26 +0000	[thread overview]
Message-ID: <EF50CC0C76A53A44BAD798C58E0A157E64B17517@ORSMSX103.amr.corp.intel.com> (raw)
In-Reply-To: <02874ECE860811409154E81DA85FBB5882AC474E@ORSMSX115.amr.corp.intel.com>



> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces@osuosl.org] On Behalf
> Of Keller, Jacob E
> Sent: Wednesday, October 11, 2017 3:20 PM
> To: Arnd Bergmann <arnd@arndb.de>; Kirsher, Jeffrey T
> <jeffrey.t.kirsher@intel.com>
> Cc: Kwan, Ngai-mint <ngai-mint.kwan@intel.com>; netdev@vger.kernel.org;
> Florian Westphal <fw@strlen.de>; linux-kernel@vger.kernel.org; intel-wired-
> lan@lists.osuosl.org; David S. Miller <davem@davemloft.net>
> Subject: Re: [Intel-wired-lan] [PATCH] fm10k: mark PM functions as
> __maybe_unused
> 
> 
> 
> > -----Original Message-----
> > From: Arnd Bergmann [mailto:arnd@arndb.de]
> > Sent: Wednesday, October 11, 2017 6:58 AM
> > To: Kirsher, Jeffrey T <jeffrey.t.kirsher@intel.com>
> > Cc: Arnd Bergmann <arnd@arndb.de>; Keller, Jacob E
> > <jacob.e.keller@intel.com>; Kwan, Ngai-mint <ngai-mint.kwan@intel.com>;
> > David S. Miller <davem@davemloft.net>; Florian Westphal <fw@strlen.de>;
> > 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 <jacob.e.keller@intel.com>
> 
> > Fixes: 8249c47c6ba4 ("fm10k: use generic PM hooks instead of legacy PCIe
> power
> > hooks")
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > ---
> >  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
> 
> _______________________________________________
> Intel-wired-lan mailing list
> Intel-wired-lan@osuosl.org
> https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>

      reply	other threads:[~2017-11-28 18:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-11 13:58 [PATCH] fm10k: mark PM functions as __maybe_unused Arnd Bergmann
2017-10-11 22:20 ` Keller, Jacob E
2017-11-28 18:51   ` Singh, Krishneil K [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=EF50CC0C76A53A44BAD798C58E0A157E64B17517@ORSMSX103.amr.corp.intel.com \
    --to=krishneil.k.singh@intel.com \
    --cc=arnd@arndb.de \
    --cc=davem@davemloft.net \
    --cc=fw@strlen.de \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jacob.e.keller@intel.com \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=ngai-mint.kwan@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).