linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: common: edma: edma_pm_resume may be unused
@ 2014-11-21 10:52 Arnd Bergmann
  2014-11-21 10:55 ` Sekhar Nori
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Arnd Bergmann @ 2014-11-21 10:52 UTC (permalink / raw)
  To: linux-arm-kernel

The recently introduced resume hook in the edma driver
is not referenced when CONFIG_PM_SLEEP is not set, which
results in a compile warning in keystone_defconfig builds.

This adds an appropriate #ifdef.

Cc: Nishanth Menon <nm@ti.com>
Cc: Daniel Mack <zonque@gmail.com>
Cc: Joel Fernandes <joelf@ti.com>
Cc: Sekhar Nori <nsekhar@ti.com>
Fixes: a2b1175131: ("ARM: common: edma: add suspend resume hook")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
I'm applying this as the obvious fixup on top of the next/drivers
branch.

diff --git a/arch/arm/common/edma.c b/arch/arm/common/edma.c
index 24a2857f2285..5662a872689b 100644
--- a/arch/arm/common/edma.c
+++ b/arch/arm/common/edma.c
@@ -1810,6 +1810,7 @@ static int edma_probe(struct platform_device *pdev)
 	return 0;
 }
 
+#ifdef CONFIG_PM_SLEEP
 static int edma_pm_resume(struct device *dev)
 {
 	int i, j;
@@ -1849,6 +1850,7 @@ static int edma_pm_resume(struct device *dev)
 
 	return 0;
 }
+#endif
 
 static const struct dev_pm_ops edma_pm_ops = {
 	SET_LATE_SYSTEM_SLEEP_PM_OPS(NULL, edma_pm_resume)

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH] ARM: common: edma: edma_pm_resume may be unused
  2014-11-21 10:52 [PATCH] ARM: common: edma: edma_pm_resume may be unused Arnd Bergmann
@ 2014-11-21 10:55 ` Sekhar Nori
  2014-11-21 13:04 ` Nishanth Menon
  2014-11-21 13:33 ` Uwe Kleine-König
  2 siblings, 0 replies; 5+ messages in thread
From: Sekhar Nori @ 2014-11-21 10:55 UTC (permalink / raw)
  To: linux-arm-kernel

On Friday 21 November 2014 04:22 PM, Arnd Bergmann wrote:
> The recently introduced resume hook in the edma driver
> is not referenced when CONFIG_PM_SLEEP is not set, which
> results in a compile warning in keystone_defconfig builds.
> 
> This adds an appropriate #ifdef.
> 
> Cc: Nishanth Menon <nm@ti.com>
> Cc: Daniel Mack <zonque@gmail.com>
> Cc: Joel Fernandes <joelf@ti.com>
> Cc: Sekhar Nori <nsekhar@ti.com>
> Fixes: a2b1175131: ("ARM: common: edma: add suspend resume hook")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> I'm applying this as the obvious fixup on top of the next/drivers
> branch.

Thanks Arnd!

FWIW,

Acked-by: Sekhar Nori <nsekhar@ti.com>

Thanks,
Sekhar

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] ARM: common: edma: edma_pm_resume may be unused
  2014-11-21 10:52 [PATCH] ARM: common: edma: edma_pm_resume may be unused Arnd Bergmann
  2014-11-21 10:55 ` Sekhar Nori
@ 2014-11-21 13:04 ` Nishanth Menon
  2014-11-21 13:33 ` Uwe Kleine-König
  2 siblings, 0 replies; 5+ messages in thread
From: Nishanth Menon @ 2014-11-21 13:04 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Nov 21, 2014 at 4:52 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> The recently introduced resume hook in the edma driver
> is not referenced when CONFIG_PM_SLEEP is not set, which
> results in a compile warning in keystone_defconfig builds.
>
> This adds an appropriate #ifdef.
>
> Cc: Nishanth Menon <nm@ti.com>
> Cc: Daniel Mack <zonque@gmail.com>
> Cc: Joel Fernandes <joelf@ti.com>
> Cc: Sekhar Nori <nsekhar@ti.com>
> Fixes: a2b1175131: ("ARM: common: edma: add suspend resume hook")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> I'm applying this as the obvious fixup on top of the next/drivers
> branch.
>
> diff --git a/arch/arm/common/edma.c b/arch/arm/common/edma.c
> index 24a2857f2285..5662a872689b 100644
> --- a/arch/arm/common/edma.c
> +++ b/arch/arm/common/edma.c
> @@ -1810,6 +1810,7 @@ static int edma_probe(struct platform_device *pdev)
>         return 0;
>  }
>
> +#ifdef CONFIG_PM_SLEEP
>  static int edma_pm_resume(struct device *dev)
>  {
>         int i, j;
> @@ -1849,6 +1850,7 @@ static int edma_pm_resume(struct device *dev)
>
>         return 0;
>  }
> +#endif

Uggh.. sorry about that..
Acked-by: Nishanth Menon <nm@ti.com>
---
Regards,
Nishanth Menon

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] ARM: common: edma: edma_pm_resume may be unused
  2014-11-21 10:52 [PATCH] ARM: common: edma: edma_pm_resume may be unused Arnd Bergmann
  2014-11-21 10:55 ` Sekhar Nori
  2014-11-21 13:04 ` Nishanth Menon
@ 2014-11-21 13:33 ` Uwe Kleine-König
  2014-11-21 14:43   ` Arnd Bergmann
  2 siblings, 1 reply; 5+ messages in thread
From: Uwe Kleine-König @ 2014-11-21 13:33 UTC (permalink / raw)
  To: linux-arm-kernel

Hello Arnd,

On Fri, Nov 21, 2014 at 11:52:51AM +0100, Arnd Bergmann wrote:
> The recently introduced resume hook in the edma driver
> is not referenced when CONFIG_PM_SLEEP is not set, which
> results in a compile warning in keystone_defconfig builds.
> 
> This adds an appropriate #ifdef.
> 
> Cc: Nishanth Menon <nm@ti.com>
> Cc: Daniel Mack <zonque@gmail.com>
> Cc: Joel Fernandes <joelf@ti.com>
> Cc: Sekhar Nori <nsekhar@ti.com>
> Fixes: a2b1175131: ("ARM: common: edma: add suspend resume hook")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> I'm applying this as the obvious fixup on top of the next/drivers
> branch.
> 
> diff --git a/arch/arm/common/edma.c b/arch/arm/common/edma.c
> index 24a2857f2285..5662a872689b 100644
> --- a/arch/arm/common/edma.c
> +++ b/arch/arm/common/edma.c
> @@ -1810,6 +1810,7 @@ static int edma_probe(struct platform_device *pdev)
>  	return 0;
>  }
>  
> +#ifdef CONFIG_PM_SLEEP
>  static int edma_pm_resume(struct device *dev)
What about

-static int edma_pm_resume(struct device *dev)
+static int __maybe_unused edma_pm_resume(struct device *dev)

instead?

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] ARM: common: edma: edma_pm_resume may be unused
  2014-11-21 13:33 ` Uwe Kleine-König
@ 2014-11-21 14:43   ` Arnd Bergmann
  0 siblings, 0 replies; 5+ messages in thread
From: Arnd Bergmann @ 2014-11-21 14:43 UTC (permalink / raw)
  To: linux-arm-kernel

On Friday 21 November 2014 14:33:50 Uwe Kleine-K?nig wrote:
> Hello Arnd,
> 
> On Fri, Nov 21, 2014 at 11:52:51AM +0100, Arnd Bergmann wrote:
> > The recently introduced resume hook in the edma driver
> > is not referenced when CONFIG_PM_SLEEP is not set, which
> > results in a compile warning in keystone_defconfig builds.
> > 
> > This adds an appropriate #ifdef.
> > 
> > Cc: Nishanth Menon <nm@ti.com>
> > Cc: Daniel Mack <zonque@gmail.com>
> > Cc: Joel Fernandes <joelf@ti.com>
> > Cc: Sekhar Nori <nsekhar@ti.com>
> > Fixes: a2b1175131: ("ARM: common: edma: add suspend resume hook")
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > ---
> > I'm applying this as the obvious fixup on top of the next/drivers
> > branch.
> > 
> > diff --git a/arch/arm/common/edma.c b/arch/arm/common/edma.c
> > index 24a2857f2285..5662a872689b 100644
> > --- a/arch/arm/common/edma.c
> > +++ b/arch/arm/common/edma.c
> > @@ -1810,6 +1810,7 @@ static int edma_probe(struct platform_device *pdev)
> >       return 0;
> >  }
> >  
> > +#ifdef CONFIG_PM_SLEEP
> >  static int edma_pm_resume(struct device *dev)
> What about
> 
> -static int edma_pm_resume(struct device *dev)
> +static int __maybe_unused edma_pm_resume(struct device *dev)
> 

That would be a little nicer, but I wouldn't go back and change my commit
now for it, since I've already committed it.

What I'd really want to see is a change to the macro to something like

#define SET_LATE_SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn) \
        .suspend_late  = IS_ENABLED(CONFIG_PM_SLEEP) ? suspend_fn : NULL, \
        .resume_early  = IS_ENABLED(CONFIG_PM_SLEEP) ? resume_fn  : NULL, \
        .freeze_late   = IS_ENABLED(CONFIG_PM_SLEEP) ? suspend_fn : NULL, \
        .thaw_early    = IS_ENABLED(CONFIG_PM_SLEEP) ? resume_fn  : NULL, \
        .poweroff_late = IS_ENABLED(CONFIG_PM_SLEEP) ? suspend_fn : NULL, \
        .restore_early = IS_ENABLED(CONFIG_PM_SLEEP) ? resume_fn  : NULL,

so we can stop doing this for every other driver. Unfortunately we haven't
been able to come up with a way to define the macro that works unless you
remove all the existing #ifdef for the suspend functions first.

	Arnd

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-11-21 14:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-21 10:52 [PATCH] ARM: common: edma: edma_pm_resume may be unused Arnd Bergmann
2014-11-21 10:55 ` Sekhar Nori
2014-11-21 13:04 ` Nishanth Menon
2014-11-21 13:33 ` Uwe Kleine-König
2014-11-21 14:43   ` Arnd Bergmann

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).