* [PATCH] rtc: stm32: Use NOIRQ_SYSTEM_SLEEP_PM_OPS()
@ 2023-08-16 11:33 Geert Uytterhoeven
2023-08-16 13:10 ` Arnd Bergmann
0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2023-08-16 11:33 UTC (permalink / raw)
To: Alessandro Zummo, Alexandre Belloni, Maxime Coquelin,
Alexandre Torgue, Arnd Bergmann, Valentin Caron
Cc: linux-rtc, linux-stm32, linux-arm-kernel, linux-kernel,
Geert Uytterhoeven
If CONFIG_PM_SLEEP=n (e.g. m68k/allmodconfig):
drivers/rtc/rtc-stm32.c:904:12: error: ‘stm32_rtc_resume’ defined but not used [-Werror=unused-function]
904 | static int stm32_rtc_resume(struct device *dev)
| ^~~~~~~~~~~~~~~~
drivers/rtc/rtc-stm32.c:894:12: error: ‘stm32_rtc_suspend’ defined but not used [-Werror=unused-function]
894 | static int stm32_rtc_suspend(struct device *dev)
| ^~~~~~~~~~~~~~~~~
Indeed, the previous change mixed up the semantics between
SET_NOIRQ_SYSTEM_SLEEP_PM_OPS() and NOIRQ_SYSTEM_SLEEP_PM_OPS().
Fix this by using the modern NOIRQ_SYSTEM_SLEEP_PM_OPS() instead.
Reported-by: noreply@ellerman.id.au
Fixes: a69c610e13e2b2de ("rtc: stm32: remove incorrect #ifdef check")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
drivers/rtc/rtc-stm32.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/rtc/rtc-stm32.c b/drivers/rtc/rtc-stm32.c
index 3ce4b3d08155b48d..76753c71d92eef3e 100644
--- a/drivers/rtc/rtc-stm32.c
+++ b/drivers/rtc/rtc-stm32.c
@@ -923,7 +923,7 @@ static int stm32_rtc_resume(struct device *dev)
}
static const struct dev_pm_ops stm32_rtc_pm_ops = {
- SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(stm32_rtc_suspend, stm32_rtc_resume)
+ NOIRQ_SYSTEM_SLEEP_PM_OPS(stm32_rtc_suspend, stm32_rtc_resume)
};
static struct platform_driver stm32_rtc_driver = {
--
2.34.1
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] rtc: stm32: Use NOIRQ_SYSTEM_SLEEP_PM_OPS()
2023-08-16 11:33 [PATCH] rtc: stm32: Use NOIRQ_SYSTEM_SLEEP_PM_OPS() Geert Uytterhoeven
@ 2023-08-16 13:10 ` Arnd Bergmann
0 siblings, 0 replies; 2+ messages in thread
From: Arnd Bergmann @ 2023-08-16 13:10 UTC (permalink / raw)
To: Geert Uytterhoeven, Alessandro Zummo, Alexandre Belloni,
Maxime Coquelin, Alexandre Torgue, Valentin Caron
Cc: linux-rtc, linux-stm32, linux-arm-kernel, linux-kernel
On Wed, Aug 16, 2023, at 13:33, Geert Uytterhoeven wrote:
> If CONFIG_PM_SLEEP=n (e.g. m68k/allmodconfig):
>
> drivers/rtc/rtc-stm32.c:904:12: error: ‘stm32_rtc_resume’ defined
> but not used [-Werror=unused-function]
> 904 | static int stm32_rtc_resume(struct device *dev)
> | ^~~~~~~~~~~~~~~~
> drivers/rtc/rtc-stm32.c:894:12: error: ‘stm32_rtc_suspend’ defined
> but not used [-Werror=unused-function]
> 894 | static int stm32_rtc_suspend(struct device *dev)
> | ^~~~~~~~~~~~~~~~~
>
> Indeed, the previous change mixed up the semantics between
> SET_NOIRQ_SYSTEM_SLEEP_PM_OPS() and NOIRQ_SYSTEM_SLEEP_PM_OPS().
> Fix this by using the modern NOIRQ_SYSTEM_SLEEP_PM_OPS() instead.
>
> Reported-by: noreply@ellerman.id.au
> Fixes: a69c610e13e2b2de ("rtc: stm32: remove incorrect #ifdef check")
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-08-16 13:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-16 11:33 [PATCH] rtc: stm32: Use NOIRQ_SYSTEM_SLEEP_PM_OPS() Geert Uytterhoeven
2023-08-16 13:10 ` Arnd Bergmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®