The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH v2 0/2] memory: Convert drivers to DEFINE_SIMPLE_DEV_PM_OPS()
@ 2026-08-25  9:11 Triet Hoang
  2026-08-25  9:11 ` [PATCH v2 1/2] memory: atmel-ebi: Convert " Triet Hoang
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Triet Hoang @ 2026-08-25  9:11 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: Krzysztof Kozlowski, Nicolas Ferre, Alexandre Belloni,
	Claudiu Beznea, Michal Simek, linux-kernel, linux-arm-kernel,
	Triet Hoang

This series converts the Atmel EBI and PL353 SMC memory drivers to use
DEFINE_SIMPLE_DEV_PM_OPS().

This is a straightforward cleanup with no functional change intended.

Signed-off-by: Triet Hoang <triet.hoang.dev@gmail.com>
---
Changes in v2:
- Wrap to 75 ish chars for commit messages.
- Organize patches into a series with a cover letter.
---
Triet Hoang (2):
  memory: atmel-ebi: Convert to DEFINE_SIMPLE_DEV_PM_OPS()
  memory: pl353: Convert to DEFINE_SIMPLE_DEV_PM_OPS()

 drivers/memory/atmel-ebi.c | 6 +++---
 drivers/memory/pl353-smc.c | 8 ++++----
 2 files changed, 7 insertions(+), 7 deletions(-)

-- 
2.53.0


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

* [PATCH v2 1/2] memory: atmel-ebi: Convert to DEFINE_SIMPLE_DEV_PM_OPS()
  2026-08-25  9:11 [PATCH v2 0/2] memory: Convert drivers to DEFINE_SIMPLE_DEV_PM_OPS() Triet Hoang
@ 2026-08-25  9:11 ` Triet Hoang
  2026-08-25  9:11 ` [PATCH v2 2/2] memory: pl353: " Triet Hoang
  2026-08-25  9:13 ` [PATCH v2 0/2] memory: Convert drivers " Krzysztof Kozlowski
  2 siblings, 0 replies; 5+ messages in thread
From: Triet Hoang @ 2026-08-25  9:11 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: Krzysztof Kozlowski, Nicolas Ferre, Alexandre Belloni,
	Claudiu Beznea, Michal Simek, linux-kernel, linux-arm-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 the 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/atmel-ebi.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/memory/atmel-ebi.c b/drivers/memory/atmel-ebi.c
index 1e8e8aba2542..3b1246e9ed66 100644
--- a/drivers/memory/atmel-ebi.c
+++ b/drivers/memory/atmel-ebi.c
@@ -610,7 +610,7 @@ static int atmel_ebi_probe(struct platform_device *pdev)
 	return of_platform_populate(np, NULL, NULL, dev);
 }
 
-static __maybe_unused int atmel_ebi_resume(struct device *dev)
+static int atmel_ebi_resume(struct device *dev)
 {
 	struct atmel_ebi *ebi = dev_get_drvdata(dev);
 	struct atmel_ebi_dev *ebid;
@@ -625,14 +625,14 @@ static __maybe_unused int atmel_ebi_resume(struct device *dev)
 	return 0;
 }
 
-static SIMPLE_DEV_PM_OPS(atmel_ebi_pm_ops, NULL, atmel_ebi_resume);
+static DEFINE_SIMPLE_DEV_PM_OPS(atmel_ebi_pm_ops, NULL, atmel_ebi_resume);
 
 static struct platform_driver atmel_ebi_driver = {
 	.probe = atmel_ebi_probe,
 	.driver = {
 		.name = "atmel-ebi",
 		.of_match_table	= atmel_ebi_id_table,
-		.pm = &atmel_ebi_pm_ops,
+		.pm = pm_sleep_ptr(&atmel_ebi_pm_ops),
 	},
 };
 builtin_platform_driver(atmel_ebi_driver);
-- 
2.53.0


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

* [PATCH v2 2/2] memory: pl353: Convert to DEFINE_SIMPLE_DEV_PM_OPS()
  2026-08-25  9:11 [PATCH v2 0/2] memory: Convert drivers to DEFINE_SIMPLE_DEV_PM_OPS() Triet Hoang
  2026-08-25  9:11 ` [PATCH v2 1/2] memory: atmel-ebi: Convert " Triet Hoang
@ 2026-08-25  9:11 ` Triet Hoang
  2026-08-25  9:13 ` [PATCH v2 0/2] memory: Convert drivers " Krzysztof Kozlowski
  2 siblings, 0 replies; 5+ messages in thread
From: Triet Hoang @ 2026-08-25  9:11 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: Krzysztof Kozlowski, Nicolas Ferre, Alexandre Belloni,
	Claudiu Beznea, Michal Simek, linux-kernel, linux-arm-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 the 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] 5+ messages in thread

* Re: [PATCH v2 0/2] memory: Convert drivers to DEFINE_SIMPLE_DEV_PM_OPS()
  2026-08-25  9:11 [PATCH v2 0/2] memory: Convert drivers to DEFINE_SIMPLE_DEV_PM_OPS() Triet Hoang
  2026-08-25  9:11 ` [PATCH v2 1/2] memory: atmel-ebi: Convert " Triet Hoang
  2026-08-25  9:11 ` [PATCH v2 2/2] memory: pl353: " Triet Hoang
@ 2026-08-25  9:13 ` Krzysztof Kozlowski
  2026-08-25  9:21   ` Triet Hoang
  2 siblings, 1 reply; 5+ messages in thread
From: Krzysztof Kozlowski @ 2026-08-25  9:13 UTC (permalink / raw)
  To: Triet Hoang, Miquel Raynal
  Cc: Nicolas Ferre, Alexandre Belloni, Claudiu Beznea, Michal Simek,
	linux-kernel, linux-arm-kernel

On 25/08/2026 11:11, Triet Hoang wrote:
> This series converts the Atmel EBI and PL353 SMC memory drivers to use
> DEFINE_SIMPLE_DEV_PM_OPS().
> 
> This is a straightforward cleanup with no functional change intended.
> 
> Signed-off-by: Triet Hoang <triet.hoang.dev@gmail.com>
> ---
> Changes in v2:
> - Wrap to 75 ish chars for commit messages.
> - Organize patches into a series with a cover letter.

Did you receive review?

<form letter>
This is a friendly reminder during the review process.

It looks like you received a tag and forgot to add it.

If you do not know the process, here is a short explanation:
Please add Acked-by/Reviewed-by/Tested-by tags when posting new versions
of patchset, under or above your Signed-off-by tag, unless patch changed
significantly (e.g. new properties added to the DT bindings). Tag is
"received", when provided in a message replied to you on the mailing
list. Tools like b4 can help here. However, there's no need to repost
patches *only* to add the tags. The upstream maintainer will do that for
tags received on the version they apply.

Please read:
https://elixir.bootlin.com/linux/v6.12-rc3/source/Documentation/process/submitting-patches.rst#L577

If a tag was not added on purpose, please state in the patch changelog
or cover letter why and what changed.
</form letter>


Best regards,
Krzysztof

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

* Re: [PATCH v2 0/2] memory: Convert drivers to DEFINE_SIMPLE_DEV_PM_OPS()
  2026-08-25  9:13 ` [PATCH v2 0/2] memory: Convert drivers " Krzysztof Kozlowski
@ 2026-08-25  9:21   ` Triet Hoang
  0 siblings, 0 replies; 5+ messages in thread
From: Triet Hoang @ 2026-08-25  9:21 UTC (permalink / raw)
  To: krzk
  Cc: alexandre.belloni, claudiu.beznea, linux-arm-kernel, linux-kernel,
	michal.simek, miquel.raynal, nicolas.ferre, triet.hoang.dev

On Tue, 25 Aug 2026 11:13:22 +0200, Krzysztof Kozlowski wrote:

> Did you receive review?
> 
> <form letter>
> This is a friendly reminder during the review process.
> 
> It looks like you received a tag and forgot to add it.
> 
> If you do not know the process, here is a short explanation:
> Please add Acked-by/Reviewed-by/Tested-by tags when posting new versions
> of patchset, under or above your Signed-off-by tag, unless patch changed
> significantly (e.g. new properties added to the DT bindings). Tag is
> "received", when provided in a message replied to you on the mailing
> list. Tools like b4 can help here. However, there's no need to repost
> patches *only* to add the tags. The upstream maintainer will do that for
> tags received on the version they apply.
> 
> Please read:
> https://elixir.bootlin.com/linux/v6.12-rc3/source/Documentation/process/submitting-patches.rst#L577
> 
> If a tag was not added on purpose, please state in the patch changelog
> or cover letter why and what changed.
> </form letter>

Yes, this was my mistake. I missed adding the review tag when preparing v2.

This is still new to me, so thank you very much for the explanation and guidance. 
I’ll make sure to keep this in mind for future working.

Regards,
Triet

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

end of thread, other threads:[~2026-08-25  9:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-25  9:11 [PATCH v2 0/2] memory: Convert drivers to DEFINE_SIMPLE_DEV_PM_OPS() Triet Hoang
2026-08-25  9:11 ` [PATCH v2 1/2] memory: atmel-ebi: Convert " Triet Hoang
2026-08-25  9:11 ` [PATCH v2 2/2] memory: pl353: " Triet Hoang
2026-08-25  9:13 ` [PATCH v2 0/2] memory: Convert drivers " Krzysztof Kozlowski
2026-08-25  9:21   ` Triet Hoang

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