Skip to contentSkip to conversation

mfd: cs42l43: Use correct macro for new-style PM runtime ops

PATCH In review Charles Keepax 5 participants 7 messages Aug 22, 2023 – Sep 14, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mfd: cs42l43: Use correct macro for new-style PM runtime ops

The code was accidentally mixing new and old style macros, update the macros used to remove an unused function warning whilst building with no PM enabled in the config.

Fixes ace6d1448138 ("mfd: cs42l43: Add support for cs42l43 core driver")
---
 drivers/mfd/cs42l43.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mfd/cs42l43.c +2 -2
index 37b23e9bae823..7b6d07cbe6fc6 100644
@@ -1178,8 +1178,8 @@ static int cs42l43_runtime_resume(struct device *dev)
 }
 
 EXPORT_NS_GPL_DEV_PM_OPS(cs42l43_pm_ops, MFD_CS42L43) = {
-	SET_SYSTEM_SLEEP_PM_OPS(cs42l43_suspend, cs42l43_resume)
-	SET_RUNTIME_PM_OPS(cs42l43_runtime_suspend, cs42l43_runtime_resume, NULL)
+	SYSTEM_SLEEP_PM_OPS(cs42l43_suspend, cs42l43_resume)
+	RUNTIME_PM_OPS(cs42l43_runtime_suspend, cs42l43_runtime_resume, NULL)
 };
 
 MODULE_DESCRIPTION("CS42L43 Core Driver");
Signature · 1 line
2.30.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Charles Keepax

The code was accidentally mixing new and old style macros, update the macros used to remove an unused function warning whilst building with no PM enabled in the config.

Fixes ace6d1448138 ("mfd: cs42l43: Add support for cs42l43 core driver")

This is obviously the correct fix for the reported warnings.

Quoted 22 lines
---
 drivers/mfd/cs42l43.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mfd/cs42l43.c +2 -2
index 37b23e9bae823..7b6d07cbe6fc6 100644
@@ -1178,8 +1178,8 @@ static int cs42l43_runtime_resume(struct device *dev)
 }
 
 EXPORT_NS_GPL_DEV_PM_OPS(cs42l43_pm_ops, MFD_CS42L43) = {
-	SET_SYSTEM_SLEEP_PM_OPS(cs42l43_suspend, cs42l43_resume)
-	SET_RUNTIME_PM_OPS(cs42l43_runtime_suspend, cs42l43_runtime_resume, NULL)
+	SYSTEM_SLEEP_PM_OPS(cs42l43_suspend, cs42l43_resume)
+	RUNTIME_PM_OPS(cs42l43_runtime_suspend, cs42l43_runtime_resume, NULL)
 };
 
 MODULE_DESCRIPTION("CS42L43 Core Driver");
Signature · 1 line
2.30.2
Tested-by on v1 1/1
#2 lore raw
In reply to Charles Keepax
Quoted 6 lines · Charles Keepax

The code was accidentally mixing new and old style macros, update the macros used to remove an unused function warning whilst building with no PM enabled in the config.

Fixes ace6d1448138 ("mfd: cs42l43: Add support for cs42l43 core driver")

Thanks, this fixes the m68k/allmodconfig build for me.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

maintainer Acked-by on v1 1/1
#3 lore raw
In reply to Charles Keepax
Quoted 15 lines · Charles Keepax

The code was accidentally mixing new and old style macros, update the macros used to remove an unused function warning whilst building with no PM enabled in the config.

Fixes ace6d1448138 ("mfd: cs42l43: Add support for cs42l43 core driver")
---
 drivers/mfd/cs42l43.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mfd/cs42l43.c +0 -0
index 37b23e9bae823..7b6d07cbe6fc6 100644

drivers/mfd/cs42l43.c static int cs42l43_runtime_resume(struct device *dev) · line 1185

Quoted 10 lines
drivers/mfd/cs42l43.c +2 -2
@@ -1178,8 +1178,8 @@ static int cs42l43_runtime_resume(struct device *dev)
 }
 
 EXPORT_NS_GPL_DEV_PM_OPS(cs42l43_pm_ops, MFD_CS42L43) = {
-	SET_SYSTEM_SLEEP_PM_OPS(cs42l43_suspend, cs42l43_resume)
-	SET_RUNTIME_PM_OPS(cs42l43_runtime_suspend, cs42l43_runtime_resume, NULL)
+	SYSTEM_SLEEP_PM_OPS(cs42l43_suspend, cs42l43_resume)
+	RUNTIME_PM_OPS(cs42l43_runtime_suspend, cs42l43_runtime_resume, NULL)
 };
 
 MODULE_DESCRIPTION("CS42L43 Core Driver");

If anyone wants to submit this directly to Linus before -rc1, please, be my guest.

Signature · 1 line
Lee Jones [李琼斯]
#4 lore raw
Quoted 26 lines · Lee Jones
Quoted 24 lines · Charles Keepax

The code was accidentally mixing new and old style macros, update the macros used to remove an unused function warning whilst building with no PM enabled in the config.

Fixes ace6d1448138 ("mfd: cs42l43: Add support for cs42l43 core driver")
---
 drivers/mfd/cs42l43.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mfd/cs42l43.c +2 -2
index 37b23e9bae823..7b6d07cbe6fc6 100644
@@ -1178,8 +1178,8 @@ static int cs42l43_runtime_resume(struct device *dev)
 }
 
 EXPORT_NS_GPL_DEV_PM_OPS(cs42l43_pm_ops, MFD_CS42L43) = {
-	SET_SYSTEM_SLEEP_PM_OPS(cs42l43_suspend, cs42l43_resume)
-	SET_RUNTIME_PM_OPS(cs42l43_runtime_suspend, cs42l43_runtime_resume, NULL)
+	SYSTEM_SLEEP_PM_OPS(cs42l43_suspend, cs42l43_resume)
+	RUNTIME_PM_OPS(cs42l43_runtime_suspend, cs42l43_runtime_resume, NULL)
 };
 
Quoted 6 lines

drivers/mfd/cs42l43.c static int cs42l43_runtime_resume(struct device *dev) · line 1185

Quoted 1 line
drivers/mfd/cs42l43.c +0 -0
 MODULE_DESCRIPTION("CS42L43 Core Driver");

If anyone wants to submit this directly to Linus before -rc1, please, be my guest.

But you're the MFD maintainer, aren't you? So I think everyone is expecting you to send it to Linus.

cheers

#5 lore raw
Quoted 30 lines · Michael Ellerman
Quoted 29 lines · Lee Jones
Quoted 15 lines · Charles Keepax

The code was accidentally mixing new and old style macros, update the macros used to remove an unused function warning whilst building with no PM enabled in the config.

Fixes ace6d1448138 ("mfd: cs42l43: Add support for cs42l43 core driver")
---
 drivers/mfd/cs42l43.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mfd/cs42l43.c +0 -0
index 37b23e9bae823..7b6d07cbe6fc6 100644

drivers/mfd/cs42l43.c static int cs42l43_runtime_resume(struct device *dev) · line 1185

Quoted 10 lines
drivers/mfd/cs42l43.c +2 -2
@@ -1178,8 +1178,8 @@ static int cs42l43_runtime_resume(struct device *dev)
 }
 
 EXPORT_NS_GPL_DEV_PM_OPS(cs42l43_pm_ops, MFD_CS42L43) = {
-    SET_SYSTEM_SLEEP_PM_OPS(cs42l43_suspend, cs42l43_resume)
-    SET_RUNTIME_PM_OPS(cs42l43_runtime_suspend, cs42l43_runtime_resume, NULL)
+    SYSTEM_SLEEP_PM_OPS(cs42l43_suspend, cs42l43_resume)
+    RUNTIME_PM_OPS(cs42l43_runtime_suspend, cs42l43_runtime_resume, NULL)
 };
 
 MODULE_DESCRIPTION("CS42L43 Core Driver");
Quoted 5 lines
Quoted 2 lines

If anyone wants to submit this directly to Linus before -rc1, please, be my guest.

But you're the MFD maintainer, aren't you? So I think everyone is expecting you to send it to Linus.

+1 ;-)

And:

    commit ace6d14481386ec6c1b63cc2b24c71433a583dc2
    Author:     Charles Keepax <[email protected]>
    AuthorDate: Fri Aug 4 11:45:59 2023 +0100
    Commit:     Lee Jones <[email protected]>
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
    CommitDate: Thu Aug 17 12:06:11 2023 +0100

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
maintainer
#6 lore raw
In reply to Michael Ellerman
Quoted 31 lines · Michael Ellerman
Quoted 30 lines · Lee Jones
Quoted 15 lines · Charles Keepax

The code was accidentally mixing new and old style macros, update the macros used to remove an unused function warning whilst building with no PM enabled in the config.

Fixes ace6d1448138 ("mfd: cs42l43: Add support for cs42l43 core driver")
---
 drivers/mfd/cs42l43.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mfd/cs42l43.c +0 -0
index 37b23e9bae823..7b6d07cbe6fc6 100644

drivers/mfd/cs42l43.c static int cs42l43_runtime_resume(struct device *dev) · line 1185

Quoted 10 lines
drivers/mfd/cs42l43.c +2 -2
@@ -1178,8 +1178,8 @@ static int cs42l43_runtime_resume(struct device *dev)
 }
 
 EXPORT_NS_GPL_DEV_PM_OPS(cs42l43_pm_ops, MFD_CS42L43) = {
-	SET_SYSTEM_SLEEP_PM_OPS(cs42l43_suspend, cs42l43_resume)
-	SET_RUNTIME_PM_OPS(cs42l43_runtime_suspend, cs42l43_runtime_resume, NULL)
+	SYSTEM_SLEEP_PM_OPS(cs42l43_suspend, cs42l43_resume)
+	RUNTIME_PM_OPS(cs42l43_runtime_suspend, cs42l43_runtime_resume, NULL)
 };
 
 MODULE_DESCRIPTION("CS42L43 Core Driver");
Quoted 5 lines
Quoted 2 lines

If anyone wants to submit this directly to Linus before -rc1, please, be my guest.

But you're the MFD maintainer, aren't you? So I think everyone is expecting you to send it to Linus.

And I will. The offer was in case anyone (with more spare time than I) wanted to send it before I had a chance.

Signature · 1 line
Lee Jones [李琼斯]