Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] memory: pl353: Convert to DEFINE_SIMPLE_DEV_PM_OPS()
@ 2026-08-21  7:44 Triet Hoang
  2026-08-21  7:45 ` Krzysztof Kozlowski
  0 siblings, 1 reply; 3+ messages in thread
From: Triet Hoang @ 2026-08-21  7:44 UTC (permalink / raw)
  To: miquel.raynal
  Cc: michal.simek, krzk, linux-arm-kernel, linux-kernel, Triet Hoang

Convert the deprecated SIMPLE_DEV_PM_OPS
to DEFINE_SIMPLE_DEV_PM_OPS
and pm_sleep_ptr().

This lets us drop the __maybe_unused annotations
from its suspend and resume callbacks,
also reduces kernel size in case CONFIG_PM or
CONFIG_PM_SLEEP is disabled.

Signed-off-by: Triet Hoang <triet.hoang.dev@gmail.com>
---
 drivers/memory/pl353-smc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/memory/pl353-smc.c b/drivers/memory/pl353-smc.c
index 28a8cc56003c..047e42c8715a 100644
--- a/drivers/memory/pl353-smc.c
+++ b/drivers/memory/pl353-smc.c
@@ -25,7 +25,7 @@ struct pl353_smc_data {
 	struct clk		*aclk;
 };
 
-static int __maybe_unused pl353_smc_suspend(struct device *dev)
+static int pl353_smc_suspend(struct device *dev)
 {
 	struct pl353_smc_data *pl353_smc = dev_get_drvdata(dev);
 
@@ -35,7 +35,7 @@ static int __maybe_unused pl353_smc_suspend(struct device *dev)
 	return 0;
 }
 
-static int __maybe_unused pl353_smc_resume(struct device *dev)
+static int pl353_smc_resume(struct device *dev)
 {
 	struct pl353_smc_data *pl353_smc = dev_get_drvdata(dev);
 	int ret;
@@ -56,7 +56,7 @@ static int __maybe_unused pl353_smc_resume(struct device *dev)
 	return ret;
 }
 
-static SIMPLE_DEV_PM_OPS(pl353_smc_dev_pm_ops, pl353_smc_suspend,
+static DEFINE_SIMPLE_DEV_PM_OPS(pl353_smc_dev_pm_ops, pl353_smc_suspend,
 			 pl353_smc_resume);
 
 static const struct of_device_id pl353_smc_supported_children[] = {
@@ -121,7 +121,7 @@ MODULE_DEVICE_TABLE(amba, pl353_ids);
 static struct amba_driver pl353_smc_driver = {
 	.drv = {
 		.name = "pl353-smc",
-		.pm = &pl353_smc_dev_pm_ops,
+		.pm = pm_sleep_ptr(&pl353_smc_dev_pm_ops),
 	},
 	.id_table = pl353_ids,
 	.probe = pl353_smc_probe,
-- 
2.53.0



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

* Re: [PATCH] memory: pl353: Convert to DEFINE_SIMPLE_DEV_PM_OPS()
  2026-08-21  7:44 [PATCH] memory: pl353: Convert to DEFINE_SIMPLE_DEV_PM_OPS() Triet Hoang
@ 2026-08-21  7:45 ` Krzysztof Kozlowski
  2026-08-21  8:10   ` [PATCH] memory: atmel-ebi: " Triet Hoang
  0 siblings, 1 reply; 3+ messages in thread
From: Krzysztof Kozlowski @ 2026-08-21  7:45 UTC (permalink / raw)
  To: Triet Hoang, miquel.raynal; +Cc: michal.simek, linux-arm-kernel, linux-kernel

On 21/08/2026 09:44, Triet Hoang wrote:
> Convert the deprecated SIMPLE_DEV_PM_OPS
> to DEFINE_SIMPLE_DEV_PM_OPS
> and pm_sleep_ptr().
> 
> This lets us drop the __maybe_unused annotations
> from its suspend and resume callbacks,
> also reduces kernel size in case CONFIG_PM or
> CONFIG_PM_SLEEP is disabled.
> 
> Signed-off-by: Triet Hoang <triet.hoang.dev@gmail.com>
> ---

So I should respond to every email?

Best regards,
Krzysztof


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

* Re: [PATCH] memory: atmel-ebi: Convert to DEFINE_SIMPLE_DEV_PM_OPS()
  2026-08-21  7:45 ` Krzysztof Kozlowski
@ 2026-08-21  8:10   ` Triet Hoang
  0 siblings, 0 replies; 3+ messages in thread
From: Triet Hoang @ 2026-08-21  8:10 UTC (permalink / raw)
  To: krzk
  Cc: linux-arm-kernel, linux-kernel, michal.simek, miquel.raynal,
	triet.hoang.dev

On Fri, 21 Aug 2026 09:45:50 +0200
Krzysztof Kozlowski <krzk@kernel.org> wrote:

> So I should respond to every email?

Hi Krzysztof,

I am sorry for the inconvenience. 
I understand that I should have organized the patches 
into subsystem-based patchsets instead of sending them separately.

Currently, I only have these two patches for the memory controller subsystem. 
Could you please review them? I will make sure to organize my patches 
properly in the future.

Thank you for your patience and guidance.

Regards,
Triet


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

end of thread, other threads:[~2026-08-21  8:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-21  7:44 [PATCH] memory: pl353: Convert to DEFINE_SIMPLE_DEV_PM_OPS() Triet Hoang
2026-08-21  7:45 ` Krzysztof Kozlowski
2026-08-21  8:10   ` [PATCH] memory: atmel-ebi: " Triet Hoang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox