ARM: common: edma: edma_pm_resume may be unused
PATCH 1/1 ARM: common: edma: edma_pm_resume may be unused
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.
---
I'm applying this as the obvious fixup on top of the next/drivers branch.
arch/arm/common/edma.c +2 -0
@@ -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)
PATCH 1/1 ARM: common: edma: edma_pm_resume may be unused
Quoted 12 lines · Arnd Bergmann
The recently introduced resume hook in the edma driver is not referenced when
CONFIG_PM_SLEEPis not set, which results in a compile warning inkeystone_defconfigbuilds.This adds an appropriate #ifdef.
Cc Nishanth Menon <[email protected]>Cc Daniel Mack <[email protected]>Cc Joel Fernandes <[email protected]>Cc Sekhar Nori <[email protected]>Fixes a2b1175131: ("ARM: common: edma: add suspend resume hook")Signed-off-by Arnd Bergmann <[email protected]>
Quoted 3 lines
---
I'm applying this as the obvious fixup on top of the next/drivers branch.
Thanks Arnd!
FWIW,
Thanks,
Sekhar
PATCH 1/1 ARM: common: edma: edma_pm_resume may be unused
In reply to Arnd BergmannQuoted 29 lines · Arnd Bergmann
The recently introduced resume hook in the edma driver is not referenced when
CONFIG_PM_SLEEPis not set, which results in a compile warning inkeystone_defconfigbuilds.This adds an appropriate #ifdef.
Cc Nishanth Menon <[email protected]>Cc Daniel Mack <[email protected]>Cc Joel Fernandes <[email protected]>Cc Sekhar Nori <[email protected]>Fixes a2b1175131: ("ARM: common: edma: add suspend resume hook")Signed-off-by Arnd Bergmann <[email protected]>---
I'm applying this as the obvious fixup on top of the next/drivers branch.arch/arm/common/edma.c +1
-0@@ -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;
arch/arm/common/edma.c static int edma_pm_resume(struct device *dev) · line 1853
Quoted 4 lines
arch/arm/common/edma.c +1
-0@@ -1849,6 +1850,7 @@ static int edma_pm_resume(struct device *dev) return 0; } +#endif
Uggh.. sorry about that..
---
Regards,
Nishanth Menon
PATCH 1/1 ARM: common: edma: edma_pm_resume may be unused
In reply to Arnd BergmannHello Arnd,
Quoted 21 lines · Arnd Bergmann
The recently introduced resume hook in the edma driver is not referenced when
CONFIG_PM_SLEEPis not set, which results in a compile warning inkeystone_defconfigbuilds.This adds an appropriate #ifdef.
Cc Nishanth Menon <[email protected]>Cc Daniel Mack <[email protected]>Cc Joel Fernandes <[email protected]>Cc Sekhar Nori <[email protected]>Fixes a2b1175131: ("ARM: common: edma: add suspend resume hook")Signed-off-by Arnd Bergmann <[email protected]>---
I'm applying this as the obvious fixup on top of the next/drivers branch.arch/arm/common/edma.c +0
-0
arch/arm/common/edma.c static int edma_probe(struct platform_device *pdev) · line 1814
Quoted 5 lines
arch/arm/common/edma.c +1
-0@@ -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
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
PATCH 1/1 ARM: common: edma: edma_pm_resume may be unused
Quoted 32 lines · On Friday 21 November 2014 14:33:50 Uwe Kleine-K?nig wrote:
Hello Arnd,
Quoted 21 lines · Arnd Bergmann
The recently introduced resume hook in the edma driver is not referenced when
CONFIG_PM_SLEEPis not set, which results in a compile warning inkeystone_defconfigbuilds.This adds an appropriate #ifdef.
Cc Nishanth Menon <[email protected]>Cc Daniel Mack <[email protected]>Cc Joel Fernandes <[email protected]>Cc Sekhar Nori <[email protected]>Fixes a2b1175131: ("ARM: common: edma: add suspend resume hook")Signed-off-by Arnd Bergmann <[email protected]>---
I'm applying this as the obvious fixup on top of the next/drivers branch.arch/arm/common/edma.c +0
-0arch/arm/common/edma.c static int edma_probe(struct platform_device *pdev) · line 1814
Quoted 5 lines
arch/arm/common/edma.c +1
-0@@ -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
Review
Quoted 2 lines
(quoted diff) +1
-1-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