diff mbox series

[1/2] counter: intel-qep: Mark PM callbacks with __maybe_unused

Message ID 20210611115558.796338-1-jarkko.nikula@linux.intel.com (mailing list archive)
State Mainlined
Headers show
Series [1/2] counter: intel-qep: Mark PM callbacks with __maybe_unused | expand

Commit Message

Jarkko Nikula June 11, 2021, 11:55 a.m. UTC
Remove CONFIG_PM ifdef and mark PM callbacks with __maybe_unused.

Suggested-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
---
 drivers/counter/intel-qep.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

Jonathan Cameron June 11, 2021, 5:23 p.m. UTC | #1
On Fri, 11 Jun 2021 14:55:57 +0300
Jarkko Nikula <jarkko.nikula@linux.intel.com> wrote:

> Remove CONFIG_PM ifdef and mark PM callbacks with __maybe_unused.
> 
> Suggested-by: Jonathan Cameron <jic23@kernel.org>
> Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>

Both applied to the togreg branch of iio.git and pushed out
as testing to let 0-day poke at them.

William, if you want to give feedback on these, still time for
me to add tags etc. They just seem trivial enough its not worth
wasting your time :)

Jonathan


> ---
>  drivers/counter/intel-qep.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/counter/intel-qep.c b/drivers/counter/intel-qep.c
> index ab10ba33f46a..a8d3dccecc0f 100644
> --- a/drivers/counter/intel-qep.c
> +++ b/drivers/counter/intel-qep.c
> @@ -473,8 +473,7 @@ static void intel_qep_remove(struct pci_dev *pci)
>  	intel_qep_writel(qep, INTEL_QEPCON, 0);
>  }
>  
> -#ifdef CONFIG_PM
> -static int intel_qep_suspend(struct device *dev)
> +static int __maybe_unused intel_qep_suspend(struct device *dev)
>  {
>  	struct pci_dev *pdev = container_of(dev, struct pci_dev, dev);
>  	struct intel_qep *qep = pci_get_drvdata(pdev);
> @@ -486,7 +485,7 @@ static int intel_qep_suspend(struct device *dev)
>  	return 0;
>  }
>  
> -static int intel_qep_resume(struct device *dev)
> +static int __maybe_unused intel_qep_resume(struct device *dev)
>  {
>  	struct pci_dev *pdev = container_of(dev, struct pci_dev, dev);
>  	struct intel_qep *qep = pci_get_drvdata(pdev);
> @@ -512,7 +511,6 @@ static int intel_qep_resume(struct device *dev)
>  
>  	return 0;
>  }
> -#endif
>  
>  static UNIVERSAL_DEV_PM_OPS(intel_qep_pm_ops,
>  			    intel_qep_suspend, intel_qep_resume, NULL);
William Breathitt Gray June 12, 2021, 12:45 a.m. UTC | #2
On Fri, Jun 11, 2021 at 06:23:34PM +0100, Jonathan Cameron wrote:
> On Fri, 11 Jun 2021 14:55:57 +0300
> Jarkko Nikula <jarkko.nikula@linux.intel.com> wrote:
> 
> > Remove CONFIG_PM ifdef and mark PM callbacks with __maybe_unused.
> > 
> > Suggested-by: Jonathan Cameron <jic23@kernel.org>
> > Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
> 
> Both applied to the togreg branch of iio.git and pushed out
> as testing to let 0-day poke at them.
> 
> William, if you want to give feedback on these, still time for
> me to add tags etc. They just seem trivial enough its not worth
> wasting your time :)
> 
> Jonathan

Yes, these are pretty trivial and both look good to me. Feel free to add
my Ack to both patches if there's still time.

Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com>

> > ---
> >  drivers/counter/intel-qep.c | 6 ++----
> >  1 file changed, 2 insertions(+), 4 deletions(-)
> > 
> > diff --git a/drivers/counter/intel-qep.c b/drivers/counter/intel-qep.c
> > index ab10ba33f46a..a8d3dccecc0f 100644
> > --- a/drivers/counter/intel-qep.c
> > +++ b/drivers/counter/intel-qep.c
> > @@ -473,8 +473,7 @@ static void intel_qep_remove(struct pci_dev *pci)
> >  	intel_qep_writel(qep, INTEL_QEPCON, 0);
> >  }
> >  
> > -#ifdef CONFIG_PM
> > -static int intel_qep_suspend(struct device *dev)
> > +static int __maybe_unused intel_qep_suspend(struct device *dev)
> >  {
> >  	struct pci_dev *pdev = container_of(dev, struct pci_dev, dev);
> >  	struct intel_qep *qep = pci_get_drvdata(pdev);
> > @@ -486,7 +485,7 @@ static int intel_qep_suspend(struct device *dev)
> >  	return 0;
> >  }
> >  
> > -static int intel_qep_resume(struct device *dev)
> > +static int __maybe_unused intel_qep_resume(struct device *dev)
> >  {
> >  	struct pci_dev *pdev = container_of(dev, struct pci_dev, dev);
> >  	struct intel_qep *qep = pci_get_drvdata(pdev);
> > @@ -512,7 +511,6 @@ static int intel_qep_resume(struct device *dev)
> >  
> >  	return 0;
> >  }
> > -#endif
> >  
> >  static UNIVERSAL_DEV_PM_OPS(intel_qep_pm_ops,
> >  			    intel_qep_suspend, intel_qep_resume, NULL);
>
diff mbox series

Patch

diff --git a/drivers/counter/intel-qep.c b/drivers/counter/intel-qep.c
index ab10ba33f46a..a8d3dccecc0f 100644
--- a/drivers/counter/intel-qep.c
+++ b/drivers/counter/intel-qep.c
@@ -473,8 +473,7 @@  static void intel_qep_remove(struct pci_dev *pci)
 	intel_qep_writel(qep, INTEL_QEPCON, 0);
 }
 
-#ifdef CONFIG_PM
-static int intel_qep_suspend(struct device *dev)
+static int __maybe_unused intel_qep_suspend(struct device *dev)
 {
 	struct pci_dev *pdev = container_of(dev, struct pci_dev, dev);
 	struct intel_qep *qep = pci_get_drvdata(pdev);
@@ -486,7 +485,7 @@  static int intel_qep_suspend(struct device *dev)
 	return 0;
 }
 
-static int intel_qep_resume(struct device *dev)
+static int __maybe_unused intel_qep_resume(struct device *dev)
 {
 	struct pci_dev *pdev = container_of(dev, struct pci_dev, dev);
 	struct intel_qep *qep = pci_get_drvdata(pdev);
@@ -512,7 +511,6 @@  static int intel_qep_resume(struct device *dev)
 
 	return 0;
 }
-#endif
 
 static UNIVERSAL_DEV_PM_OPS(intel_qep_pm_ops,
 			    intel_qep_suspend, intel_qep_resume, NULL);