All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/6] drm/bridge: imx8mp-hdmi-tx: Switch to SYSTEM_SLEEP_PM_OPS()
@ 2024-06-26 23:06 Fabio Estevam
  2024-06-26 23:07 ` [PATCH 2/6] drm/bridge: imx8qm-ldb: Switch to RUNTIME_PM_OPS() Fabio Estevam
                   ` (7 more replies)
  0 siblings, 8 replies; 14+ messages in thread
From: Fabio Estevam @ 2024-06-26 23:06 UTC (permalink / raw)
  To: rfoss; +Cc: neil.armstrong, victor.liu, dri-devel, Fabio Estevam

From: Fabio Estevam <festevam@denx.de>

Replace SET_SYSTEM_SLEEP_PM_OPS with its modern SYSTEM_SLEEP_PM_OPS()
alternative.

The combined usage of pm_ptr() and SYSTEM_SLEEP_PM_OPS()
allows the compiler to evaluate if the runtime suspend/resume() functions
are used at build time or are simply dead code.

This allows removing the __maybe_unused notation from the runtime
suspend/resume() functions.

Signed-off-by: Fabio Estevam <festevam@denx.de>
---
 drivers/gpu/drm/bridge/imx/imx8mp-hdmi-tx.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/bridge/imx/imx8mp-hdmi-tx.c b/drivers/gpu/drm/bridge/imx/imx8mp-hdmi-tx.c
index 13bc570c5473..4a3a8a3ce250 100644
--- a/drivers/gpu/drm/bridge/imx/imx8mp-hdmi-tx.c
+++ b/drivers/gpu/drm/bridge/imx/imx8mp-hdmi-tx.c
@@ -111,12 +111,12 @@ static void imx8mp_dw_hdmi_remove(struct platform_device *pdev)
 	dw_hdmi_remove(hdmi->dw_hdmi);
 }
 
-static int __maybe_unused imx8mp_dw_hdmi_pm_suspend(struct device *dev)
+static int imx8mp_dw_hdmi_pm_suspend(struct device *dev)
 {
 	return 0;
 }
 
-static int __maybe_unused imx8mp_dw_hdmi_pm_resume(struct device *dev)
+static int imx8mp_dw_hdmi_pm_resume(struct device *dev)
 {
 	struct imx8mp_hdmi *hdmi = dev_get_drvdata(dev);
 
@@ -126,8 +126,7 @@ static int __maybe_unused imx8mp_dw_hdmi_pm_resume(struct device *dev)
 }
 
 static const struct dev_pm_ops imx8mp_dw_hdmi_pm_ops = {
-	SET_SYSTEM_SLEEP_PM_OPS(imx8mp_dw_hdmi_pm_suspend,
-				imx8mp_dw_hdmi_pm_resume)
+	SYSTEM_SLEEP_PM_OPS(imx8mp_dw_hdmi_pm_suspend, imx8mp_dw_hdmi_pm_resume)
 };
 
 static const struct of_device_id imx8mp_dw_hdmi_of_table[] = {
@@ -142,7 +141,7 @@ static struct platform_driver imx8mp_dw_hdmi_platform_driver = {
 	.driver		= {
 		.name	= "imx8mp-dw-hdmi-tx",
 		.of_match_table = imx8mp_dw_hdmi_of_table,
-		.pm = &imx8mp_dw_hdmi_pm_ops,
+		.pm = pm_ptr(&imx8mp_dw_hdmi_pm_ops),
 	},
 };
 
-- 
2.34.1


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

* [PATCH 2/6] drm/bridge: imx8qm-ldb: Switch to RUNTIME_PM_OPS()
  2024-06-26 23:06 [PATCH 1/6] drm/bridge: imx8mp-hdmi-tx: Switch to SYSTEM_SLEEP_PM_OPS() Fabio Estevam
@ 2024-06-26 23:07 ` Fabio Estevam
  2024-09-13  7:49   ` neil.armstrong
  2024-06-26 23:07 ` [PATCH 3/6] drm/bridge: imx8qxp-pixel-combiner: " Fabio Estevam
                   ` (6 subsequent siblings)
  7 siblings, 1 reply; 14+ messages in thread
From: Fabio Estevam @ 2024-06-26 23:07 UTC (permalink / raw)
  To: rfoss; +Cc: neil.armstrong, victor.liu, dri-devel, Fabio Estevam

From: Fabio Estevam <festevam@denx.de>

Replace SET_RUNTIME_PM_OPS with its modern RUNTIME_PM_OPS() alternative.

The combined usage of pm_ptr() and RUNTIME_PM_OPS()
allows the compiler to evaluate if the runtime suspend/resume() functions
are used at build time or are simply dead code.

This allows removing the __maybe_unused notation from the runtime
suspend/resume() functions.

Signed-off-by: Fabio Estevam <festevam@denx.de>
---
 drivers/gpu/drm/bridge/imx/imx8qm-ldb.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/bridge/imx/imx8qm-ldb.c b/drivers/gpu/drm/bridge/imx/imx8qm-ldb.c
index 21471a9a28b2..c879e37f5811 100644
--- a/drivers/gpu/drm/bridge/imx/imx8qm-ldb.c
+++ b/drivers/gpu/drm/bridge/imx/imx8qm-ldb.c
@@ -542,12 +542,12 @@ static void imx8qm_ldb_remove(struct platform_device *pdev)
 	pm_runtime_disable(&pdev->dev);
 }
 
-static int __maybe_unused imx8qm_ldb_runtime_suspend(struct device *dev)
+static int imx8qm_ldb_runtime_suspend(struct device *dev)
 {
 	return 0;
 }
 
-static int __maybe_unused imx8qm_ldb_runtime_resume(struct device *dev)
+static int imx8qm_ldb_runtime_resume(struct device *dev)
 {
 	struct imx8qm_ldb *imx8qm_ldb = dev_get_drvdata(dev);
 	struct ldb *ldb = &imx8qm_ldb->base;
@@ -559,8 +559,7 @@ static int __maybe_unused imx8qm_ldb_runtime_resume(struct device *dev)
 }
 
 static const struct dev_pm_ops imx8qm_ldb_pm_ops = {
-	SET_RUNTIME_PM_OPS(imx8qm_ldb_runtime_suspend,
-			   imx8qm_ldb_runtime_resume, NULL)
+	RUNTIME_PM_OPS(imx8qm_ldb_runtime_suspend, imx8qm_ldb_runtime_resume, NULL)
 };
 
 static const struct of_device_id imx8qm_ldb_dt_ids[] = {
@@ -573,7 +572,7 @@ static struct platform_driver imx8qm_ldb_driver = {
 	.probe	= imx8qm_ldb_probe,
 	.remove_new = imx8qm_ldb_remove,
 	.driver	= {
-		.pm = &imx8qm_ldb_pm_ops,
+		.pm = pm_ptr(&imx8qm_ldb_pm_ops),
 		.name = DRIVER_NAME,
 		.of_match_table = imx8qm_ldb_dt_ids,
 	},
-- 
2.34.1


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

* [PATCH 3/6] drm/bridge: imx8qxp-pixel-combiner: Switch to RUNTIME_PM_OPS()
  2024-06-26 23:06 [PATCH 1/6] drm/bridge: imx8mp-hdmi-tx: Switch to SYSTEM_SLEEP_PM_OPS() Fabio Estevam
  2024-06-26 23:07 ` [PATCH 2/6] drm/bridge: imx8qm-ldb: Switch to RUNTIME_PM_OPS() Fabio Estevam
@ 2024-06-26 23:07 ` Fabio Estevam
  2024-09-13  7:49   ` neil.armstrong
  2024-06-26 23:07 ` [PATCH 4/6] drm/bridge: samsung-dsim: " Fabio Estevam
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 14+ messages in thread
From: Fabio Estevam @ 2024-06-26 23:07 UTC (permalink / raw)
  To: rfoss; +Cc: neil.armstrong, victor.liu, dri-devel, Fabio Estevam

From: Fabio Estevam <festevam@denx.de>

Replace SET_RUNTIME_PM_OPS with its modern RUNTIME_PM_OPS() alternative.

The combined usage of pm_ptr() and RUNTIME_PM_OPS()
allows the compiler to evaluate if the runtime suspend/resume() functions
are used at build time or are simply dead code.

This allows removing the __maybe_unused notation from the runtime
suspend/resume() functions.

Signed-off-by: Fabio Estevam <festevam@denx.de>
---
 drivers/gpu/drm/bridge/imx/imx8qxp-pixel-combiner.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/bridge/imx/imx8qxp-pixel-combiner.c b/drivers/gpu/drm/bridge/imx/imx8qxp-pixel-combiner.c
index e6dbbdc87ce2..ce43e4069e21 100644
--- a/drivers/gpu/drm/bridge/imx/imx8qxp-pixel-combiner.c
+++ b/drivers/gpu/drm/bridge/imx/imx8qxp-pixel-combiner.c
@@ -371,7 +371,7 @@ static void imx8qxp_pc_bridge_remove(struct platform_device *pdev)
 	pm_runtime_disable(&pdev->dev);
 }
 
-static int __maybe_unused imx8qxp_pc_runtime_suspend(struct device *dev)
+static int imx8qxp_pc_runtime_suspend(struct device *dev)
 {
 	struct platform_device *pdev = to_platform_device(dev);
 	struct imx8qxp_pc *pc = platform_get_drvdata(pdev);
@@ -393,7 +393,7 @@ static int __maybe_unused imx8qxp_pc_runtime_suspend(struct device *dev)
 	return ret;
 }
 
-static int __maybe_unused imx8qxp_pc_runtime_resume(struct device *dev)
+static int imx8qxp_pc_runtime_resume(struct device *dev)
 {
 	struct platform_device *pdev = to_platform_device(dev);
 	struct imx8qxp_pc *pc = platform_get_drvdata(pdev);
@@ -415,8 +415,7 @@ static int __maybe_unused imx8qxp_pc_runtime_resume(struct device *dev)
 }
 
 static const struct dev_pm_ops imx8qxp_pc_pm_ops = {
-	SET_RUNTIME_PM_OPS(imx8qxp_pc_runtime_suspend,
-			   imx8qxp_pc_runtime_resume, NULL)
+	RUNTIME_PM_OPS(imx8qxp_pc_runtime_suspend, imx8qxp_pc_runtime_resume, NULL)
 };
 
 static const struct of_device_id imx8qxp_pc_dt_ids[] = {
@@ -430,7 +429,7 @@ static struct platform_driver imx8qxp_pc_bridge_driver = {
 	.probe	= imx8qxp_pc_bridge_probe,
 	.remove_new = imx8qxp_pc_bridge_remove,
 	.driver	= {
-		.pm = &imx8qxp_pc_pm_ops,
+		.pm = pm_ptr(&imx8qxp_pc_pm_ops),
 		.name = DRIVER_NAME,
 		.of_match_table = imx8qxp_pc_dt_ids,
 	},
-- 
2.34.1


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

* [PATCH 4/6] drm/bridge: samsung-dsim: Switch to RUNTIME_PM_OPS()
  2024-06-26 23:06 [PATCH 1/6] drm/bridge: imx8mp-hdmi-tx: Switch to SYSTEM_SLEEP_PM_OPS() Fabio Estevam
  2024-06-26 23:07 ` [PATCH 2/6] drm/bridge: imx8qm-ldb: Switch to RUNTIME_PM_OPS() Fabio Estevam
  2024-06-26 23:07 ` [PATCH 3/6] drm/bridge: imx8qxp-pixel-combiner: " Fabio Estevam
@ 2024-06-26 23:07 ` Fabio Estevam
  2024-09-13  7:49   ` neil.armstrong
  2024-06-26 23:07 ` [PATCH 5/6] drm/bridge: dw-hdmi-cec: Switch to SYSTEM_SLEEP_PM_OPS() Fabio Estevam
                   ` (4 subsequent siblings)
  7 siblings, 1 reply; 14+ messages in thread
From: Fabio Estevam @ 2024-06-26 23:07 UTC (permalink / raw)
  To: rfoss; +Cc: neil.armstrong, victor.liu, dri-devel, Fabio Estevam

From: Fabio Estevam <festevam@denx.de>

Replace SET_RUNTIME_PM_OPS with its modern RUNTIME_PM_OPS() alternative.

The combined usage of pm_ptr() and RUNTIME_PM_OPS()
allows the compiler to evaluate if the runtime suspend/resume() functions
are used at build time or are simply dead code.

This allows removing the __maybe_unused notation from the runtime
suspend/resume() functions.

Signed-off-by: Fabio Estevam <festevam@denx.de>
---
 drivers/gpu/drm/bridge/samsung-dsim.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/bridge/samsung-dsim.c b/drivers/gpu/drm/bridge/samsung-dsim.c
index e7e53a9e42af..73ccf21ae446 100644
--- a/drivers/gpu/drm/bridge/samsung-dsim.c
+++ b/drivers/gpu/drm/bridge/samsung-dsim.c
@@ -2043,7 +2043,7 @@ void samsung_dsim_remove(struct platform_device *pdev)
 }
 EXPORT_SYMBOL_GPL(samsung_dsim_remove);
 
-static int __maybe_unused samsung_dsim_suspend(struct device *dev)
+static int samsung_dsim_suspend(struct device *dev)
 {
 	struct samsung_dsim *dsi = dev_get_drvdata(dev);
 	const struct samsung_dsim_driver_data *driver_data = dsi->driver_data;
@@ -2073,7 +2073,7 @@ static int __maybe_unused samsung_dsim_suspend(struct device *dev)
 	return 0;
 }
 
-static int __maybe_unused samsung_dsim_resume(struct device *dev)
+static int samsung_dsim_resume(struct device *dev)
 {
 	struct samsung_dsim *dsi = dev_get_drvdata(dev);
 	const struct samsung_dsim_driver_data *driver_data = dsi->driver_data;
@@ -2108,7 +2108,7 @@ static int __maybe_unused samsung_dsim_resume(struct device *dev)
 }
 
 const struct dev_pm_ops samsung_dsim_pm_ops = {
-	SET_RUNTIME_PM_OPS(samsung_dsim_suspend, samsung_dsim_resume, NULL)
+	RUNTIME_PM_OPS(samsung_dsim_suspend, samsung_dsim_resume, NULL)
 	SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
 				pm_runtime_force_resume)
 };
@@ -2142,7 +2142,7 @@ static struct platform_driver samsung_dsim_driver = {
 	.remove_new = samsung_dsim_remove,
 	.driver = {
 		   .name = "samsung-dsim",
-		   .pm = &samsung_dsim_pm_ops,
+		   .pm = pm_ptr(&samsung_dsim_pm_ops),
 		   .of_match_table = samsung_dsim_of_match,
 	},
 };
-- 
2.34.1


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

* [PATCH 5/6] drm/bridge: dw-hdmi-cec: Switch to SYSTEM_SLEEP_PM_OPS()
  2024-06-26 23:06 [PATCH 1/6] drm/bridge: imx8mp-hdmi-tx: Switch to SYSTEM_SLEEP_PM_OPS() Fabio Estevam
                   ` (2 preceding siblings ...)
  2024-06-26 23:07 ` [PATCH 4/6] drm/bridge: samsung-dsim: " Fabio Estevam
@ 2024-06-26 23:07 ` Fabio Estevam
  2024-09-13  7:49   ` neil.armstrong
  2024-06-26 23:07 ` [PATCH 6/6] drm/bridge: imx8qxp-ldb: Switch to RUNTIME_PM_OPS() Fabio Estevam
                   ` (3 subsequent siblings)
  7 siblings, 1 reply; 14+ messages in thread
From: Fabio Estevam @ 2024-06-26 23:07 UTC (permalink / raw)
  To: rfoss; +Cc: neil.armstrong, victor.liu, dri-devel, Fabio Estevam

From: Fabio Estevam <festevam@denx.de>

Replace SET_SYSTEM_SLEEP_PM_OPS with its modern SYSTEM_SLEEP_PM_OPS()
alternative.

The combined usage of pm_ptr() and SYSTEM_SLEEP_PM_OPS()
allows the compiler to evaluate if the runtime suspend/resume() functions
are used at build time or are simply dead code.

This allows removing the __maybe_unused notation from the runtime
suspend/resume() functions.

Signed-off-by: Fabio Estevam <festevam@denx.de>
---
 drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c
index 673661160e54..d4614de1ae1e 100644
--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c
+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c
@@ -312,7 +312,7 @@ static void dw_hdmi_cec_remove(struct platform_device *pdev)
 	cec_unregister_adapter(cec->adap);
 }
 
-static int __maybe_unused dw_hdmi_cec_resume(struct device *dev)
+static int dw_hdmi_cec_resume(struct device *dev)
 {
 	struct dw_hdmi_cec *cec = dev_get_drvdata(dev);
 
@@ -328,7 +328,7 @@ static int __maybe_unused dw_hdmi_cec_resume(struct device *dev)
 	return 0;
 }
 
-static int __maybe_unused dw_hdmi_cec_suspend(struct device *dev)
+static int dw_hdmi_cec_suspend(struct device *dev)
 {
 	struct dw_hdmi_cec *cec = dev_get_drvdata(dev);
 
@@ -341,7 +341,7 @@ static int __maybe_unused dw_hdmi_cec_suspend(struct device *dev)
 }
 
 static const struct dev_pm_ops dw_hdmi_cec_pm = {
-	SET_SYSTEM_SLEEP_PM_OPS(dw_hdmi_cec_suspend, dw_hdmi_cec_resume)
+	SYSTEM_SLEEP_PM_OPS(dw_hdmi_cec_suspend, dw_hdmi_cec_resume)
 };
 
 static struct platform_driver dw_hdmi_cec_driver = {
@@ -349,7 +349,7 @@ static struct platform_driver dw_hdmi_cec_driver = {
 	.remove_new = dw_hdmi_cec_remove,
 	.driver = {
 		.name = "dw-hdmi-cec",
-		.pm = &dw_hdmi_cec_pm,
+		.pm = pm_ptr(&dw_hdmi_cec_pm),
 	},
 };
 module_platform_driver(dw_hdmi_cec_driver);
-- 
2.34.1


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

* [PATCH 6/6] drm/bridge: imx8qxp-ldb: Switch to RUNTIME_PM_OPS()
  2024-06-26 23:06 [PATCH 1/6] drm/bridge: imx8mp-hdmi-tx: Switch to SYSTEM_SLEEP_PM_OPS() Fabio Estevam
                   ` (3 preceding siblings ...)
  2024-06-26 23:07 ` [PATCH 5/6] drm/bridge: dw-hdmi-cec: Switch to SYSTEM_SLEEP_PM_OPS() Fabio Estevam
@ 2024-06-26 23:07 ` Fabio Estevam
  2024-09-13  7:49   ` neil.armstrong
  2024-08-28 20:20 ` [PATCH 1/6] drm/bridge: imx8mp-hdmi-tx: Switch to SYSTEM_SLEEP_PM_OPS() Fabio Estevam
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 14+ messages in thread
From: Fabio Estevam @ 2024-06-26 23:07 UTC (permalink / raw)
  To: rfoss; +Cc: neil.armstrong, victor.liu, dri-devel, Fabio Estevam

From: Fabio Estevam <festevam@denx.de>

Replace SET_RUNTIME_PM_OPS with its modern RUNTIME_PM_OPS() alternative.

The combined usage of pm_ptr() and RUNTIME_PM_OPS()
allows the compiler to evaluate if the runtime suspend/resume() functions
are used at build time or are simply dead code.

This allows removing the __maybe_unused notation from the runtime
suspend/resume() functions.

Signed-off-by: Fabio Estevam <festevam@denx.de>
---
 drivers/gpu/drm/bridge/imx/imx8qxp-ldb.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/bridge/imx/imx8qxp-ldb.c b/drivers/gpu/drm/bridge/imx/imx8qxp-ldb.c
index 7984da9c0a35..b33011f397f0 100644
--- a/drivers/gpu/drm/bridge/imx/imx8qxp-ldb.c
+++ b/drivers/gpu/drm/bridge/imx/imx8qxp-ldb.c
@@ -678,12 +678,12 @@ static void imx8qxp_ldb_remove(struct platform_device *pdev)
 	pm_runtime_disable(&pdev->dev);
 }
 
-static int __maybe_unused imx8qxp_ldb_runtime_suspend(struct device *dev)
+static int imx8qxp_ldb_runtime_suspend(struct device *dev)
 {
 	return 0;
 }
 
-static int __maybe_unused imx8qxp_ldb_runtime_resume(struct device *dev)
+static int imx8qxp_ldb_runtime_resume(struct device *dev)
 {
 	struct imx8qxp_ldb *imx8qxp_ldb = dev_get_drvdata(dev);
 	struct ldb *ldb = &imx8qxp_ldb->base;
@@ -695,8 +695,7 @@ static int __maybe_unused imx8qxp_ldb_runtime_resume(struct device *dev)
 }
 
 static const struct dev_pm_ops imx8qxp_ldb_pm_ops = {
-	SET_RUNTIME_PM_OPS(imx8qxp_ldb_runtime_suspend,
-			   imx8qxp_ldb_runtime_resume, NULL)
+	RUNTIME_PM_OPS(imx8qxp_ldb_runtime_suspend, imx8qxp_ldb_runtime_resume, NULL)
 };
 
 static const struct of_device_id imx8qxp_ldb_dt_ids[] = {
@@ -709,7 +708,7 @@ static struct platform_driver imx8qxp_ldb_driver = {
 	.probe	= imx8qxp_ldb_probe,
 	.remove_new = imx8qxp_ldb_remove,
 	.driver	= {
-		.pm = &imx8qxp_ldb_pm_ops,
+		.pm = pm_ptr(&imx8qxp_ldb_pm_ops),
 		.name = DRIVER_NAME,
 		.of_match_table = imx8qxp_ldb_dt_ids,
 	},
-- 
2.34.1


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

* Re: [PATCH 1/6] drm/bridge: imx8mp-hdmi-tx: Switch to SYSTEM_SLEEP_PM_OPS()
  2024-06-26 23:06 [PATCH 1/6] drm/bridge: imx8mp-hdmi-tx: Switch to SYSTEM_SLEEP_PM_OPS() Fabio Estevam
                   ` (4 preceding siblings ...)
  2024-06-26 23:07 ` [PATCH 6/6] drm/bridge: imx8qxp-ldb: Switch to RUNTIME_PM_OPS() Fabio Estevam
@ 2024-08-28 20:20 ` Fabio Estevam
  2024-09-13  7:58 ` neil.armstrong
  2024-09-13  8:12 ` Neil Armstrong
  7 siblings, 0 replies; 14+ messages in thread
From: Fabio Estevam @ 2024-08-28 20:20 UTC (permalink / raw)
  To: rfoss; +Cc: neil.armstrong, victor.liu, dri-devel, Fabio Estevam, Marek Vasut

A gentle ping on this series.

Thanks

On Wed, Jun 26, 2024 at 8:07 PM Fabio Estevam <festevam@gmail.com> wrote:
>
> From: Fabio Estevam <festevam@denx.de>
>
> Replace SET_SYSTEM_SLEEP_PM_OPS with its modern SYSTEM_SLEEP_PM_OPS()
> alternative.
>
> The combined usage of pm_ptr() and SYSTEM_SLEEP_PM_OPS()
> allows the compiler to evaluate if the runtime suspend/resume() functions
> are used at build time or are simply dead code.
>
> This allows removing the __maybe_unused notation from the runtime
> suspend/resume() functions.
>
> Signed-off-by: Fabio Estevam <festevam@denx.de>
> ---
>  drivers/gpu/drm/bridge/imx/imx8mp-hdmi-tx.c | 9 ++++-----
>  1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/imx/imx8mp-hdmi-tx.c b/drivers/gpu/drm/bridge/imx/imx8mp-hdmi-tx.c
> index 13bc570c5473..4a3a8a3ce250 100644
> --- a/drivers/gpu/drm/bridge/imx/imx8mp-hdmi-tx.c
> +++ b/drivers/gpu/drm/bridge/imx/imx8mp-hdmi-tx.c
> @@ -111,12 +111,12 @@ static void imx8mp_dw_hdmi_remove(struct platform_device *pdev)
>         dw_hdmi_remove(hdmi->dw_hdmi);
>  }
>
> -static int __maybe_unused imx8mp_dw_hdmi_pm_suspend(struct device *dev)
> +static int imx8mp_dw_hdmi_pm_suspend(struct device *dev)
>  {
>         return 0;
>  }
>
> -static int __maybe_unused imx8mp_dw_hdmi_pm_resume(struct device *dev)
> +static int imx8mp_dw_hdmi_pm_resume(struct device *dev)
>  {
>         struct imx8mp_hdmi *hdmi = dev_get_drvdata(dev);
>
> @@ -126,8 +126,7 @@ static int __maybe_unused imx8mp_dw_hdmi_pm_resume(struct device *dev)
>  }
>
>  static const struct dev_pm_ops imx8mp_dw_hdmi_pm_ops = {
> -       SET_SYSTEM_SLEEP_PM_OPS(imx8mp_dw_hdmi_pm_suspend,
> -                               imx8mp_dw_hdmi_pm_resume)
> +       SYSTEM_SLEEP_PM_OPS(imx8mp_dw_hdmi_pm_suspend, imx8mp_dw_hdmi_pm_resume)
>  };
>
>  static const struct of_device_id imx8mp_dw_hdmi_of_table[] = {
> @@ -142,7 +141,7 @@ static struct platform_driver imx8mp_dw_hdmi_platform_driver = {
>         .driver         = {
>                 .name   = "imx8mp-dw-hdmi-tx",
>                 .of_match_table = imx8mp_dw_hdmi_of_table,
> -               .pm = &imx8mp_dw_hdmi_pm_ops,
> +               .pm = pm_ptr(&imx8mp_dw_hdmi_pm_ops),
>         },
>  };
>
> --
> 2.34.1
>

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

* Re: [PATCH 2/6] drm/bridge: imx8qm-ldb: Switch to RUNTIME_PM_OPS()
  2024-06-26 23:07 ` [PATCH 2/6] drm/bridge: imx8qm-ldb: Switch to RUNTIME_PM_OPS() Fabio Estevam
@ 2024-09-13  7:49   ` neil.armstrong
  0 siblings, 0 replies; 14+ messages in thread
From: neil.armstrong @ 2024-09-13  7:49 UTC (permalink / raw)
  To: Fabio Estevam, rfoss; +Cc: victor.liu, dri-devel, Fabio Estevam

On 27/06/2024 01:07, Fabio Estevam wrote:
> From: Fabio Estevam <festevam@denx.de>
> 
> Replace SET_RUNTIME_PM_OPS with its modern RUNTIME_PM_OPS() alternative.
> 
> The combined usage of pm_ptr() and RUNTIME_PM_OPS()
> allows the compiler to evaluate if the runtime suspend/resume() functions
> are used at build time or are simply dead code.
> 
> This allows removing the __maybe_unused notation from the runtime
> suspend/resume() functions.
> 
> Signed-off-by: Fabio Estevam <festevam@denx.de>
> ---
>   drivers/gpu/drm/bridge/imx/imx8qm-ldb.c | 9 ++++-----
>   1 file changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/bridge/imx/imx8qm-ldb.c b/drivers/gpu/drm/bridge/imx/imx8qm-ldb.c
> index 21471a9a28b2..c879e37f5811 100644
> --- a/drivers/gpu/drm/bridge/imx/imx8qm-ldb.c
> +++ b/drivers/gpu/drm/bridge/imx/imx8qm-ldb.c
> @@ -542,12 +542,12 @@ static void imx8qm_ldb_remove(struct platform_device *pdev)
>   	pm_runtime_disable(&pdev->dev);
>   }
>   
> -static int __maybe_unused imx8qm_ldb_runtime_suspend(struct device *dev)
> +static int imx8qm_ldb_runtime_suspend(struct device *dev)
>   {
>   	return 0;
>   }
>   
> -static int __maybe_unused imx8qm_ldb_runtime_resume(struct device *dev)
> +static int imx8qm_ldb_runtime_resume(struct device *dev)
>   {
>   	struct imx8qm_ldb *imx8qm_ldb = dev_get_drvdata(dev);
>   	struct ldb *ldb = &imx8qm_ldb->base;
> @@ -559,8 +559,7 @@ static int __maybe_unused imx8qm_ldb_runtime_resume(struct device *dev)
>   }
>   
>   static const struct dev_pm_ops imx8qm_ldb_pm_ops = {
> -	SET_RUNTIME_PM_OPS(imx8qm_ldb_runtime_suspend,
> -			   imx8qm_ldb_runtime_resume, NULL)
> +	RUNTIME_PM_OPS(imx8qm_ldb_runtime_suspend, imx8qm_ldb_runtime_resume, NULL)
>   };
>   
>   static const struct of_device_id imx8qm_ldb_dt_ids[] = {
> @@ -573,7 +572,7 @@ static struct platform_driver imx8qm_ldb_driver = {
>   	.probe	= imx8qm_ldb_probe,
>   	.remove_new = imx8qm_ldb_remove,
>   	.driver	= {
> -		.pm = &imx8qm_ldb_pm_ops,
> +		.pm = pm_ptr(&imx8qm_ldb_pm_ops),
>   		.name = DRIVER_NAME,
>   		.of_match_table = imx8qm_ldb_dt_ids,
>   	},

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

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

* Re: [PATCH 3/6] drm/bridge: imx8qxp-pixel-combiner: Switch to RUNTIME_PM_OPS()
  2024-06-26 23:07 ` [PATCH 3/6] drm/bridge: imx8qxp-pixel-combiner: " Fabio Estevam
@ 2024-09-13  7:49   ` neil.armstrong
  0 siblings, 0 replies; 14+ messages in thread
From: neil.armstrong @ 2024-09-13  7:49 UTC (permalink / raw)
  To: Fabio Estevam, rfoss; +Cc: victor.liu, dri-devel, Fabio Estevam

On 27/06/2024 01:07, Fabio Estevam wrote:
> From: Fabio Estevam <festevam@denx.de>
> 
> Replace SET_RUNTIME_PM_OPS with its modern RUNTIME_PM_OPS() alternative.
> 
> The combined usage of pm_ptr() and RUNTIME_PM_OPS()
> allows the compiler to evaluate if the runtime suspend/resume() functions
> are used at build time or are simply dead code.
> 
> This allows removing the __maybe_unused notation from the runtime
> suspend/resume() functions.
> 
> Signed-off-by: Fabio Estevam <festevam@denx.de>
> ---
>   drivers/gpu/drm/bridge/imx/imx8qxp-pixel-combiner.c | 9 ++++-----
>   1 file changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/bridge/imx/imx8qxp-pixel-combiner.c b/drivers/gpu/drm/bridge/imx/imx8qxp-pixel-combiner.c
> index e6dbbdc87ce2..ce43e4069e21 100644
> --- a/drivers/gpu/drm/bridge/imx/imx8qxp-pixel-combiner.c
> +++ b/drivers/gpu/drm/bridge/imx/imx8qxp-pixel-combiner.c
> @@ -371,7 +371,7 @@ static void imx8qxp_pc_bridge_remove(struct platform_device *pdev)
>   	pm_runtime_disable(&pdev->dev);
>   }
>   
> -static int __maybe_unused imx8qxp_pc_runtime_suspend(struct device *dev)
> +static int imx8qxp_pc_runtime_suspend(struct device *dev)
>   {
>   	struct platform_device *pdev = to_platform_device(dev);
>   	struct imx8qxp_pc *pc = platform_get_drvdata(pdev);
> @@ -393,7 +393,7 @@ static int __maybe_unused imx8qxp_pc_runtime_suspend(struct device *dev)
>   	return ret;
>   }
>   
> -static int __maybe_unused imx8qxp_pc_runtime_resume(struct device *dev)
> +static int imx8qxp_pc_runtime_resume(struct device *dev)
>   {
>   	struct platform_device *pdev = to_platform_device(dev);
>   	struct imx8qxp_pc *pc = platform_get_drvdata(pdev);
> @@ -415,8 +415,7 @@ static int __maybe_unused imx8qxp_pc_runtime_resume(struct device *dev)
>   }
>   
>   static const struct dev_pm_ops imx8qxp_pc_pm_ops = {
> -	SET_RUNTIME_PM_OPS(imx8qxp_pc_runtime_suspend,
> -			   imx8qxp_pc_runtime_resume, NULL)
> +	RUNTIME_PM_OPS(imx8qxp_pc_runtime_suspend, imx8qxp_pc_runtime_resume, NULL)
>   };
>   
>   static const struct of_device_id imx8qxp_pc_dt_ids[] = {
> @@ -430,7 +429,7 @@ static struct platform_driver imx8qxp_pc_bridge_driver = {
>   	.probe	= imx8qxp_pc_bridge_probe,
>   	.remove_new = imx8qxp_pc_bridge_remove,
>   	.driver	= {
> -		.pm = &imx8qxp_pc_pm_ops,
> +		.pm = pm_ptr(&imx8qxp_pc_pm_ops),
>   		.name = DRIVER_NAME,
>   		.of_match_table = imx8qxp_pc_dt_ids,
>   	},

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

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

* Re: [PATCH 4/6] drm/bridge: samsung-dsim: Switch to RUNTIME_PM_OPS()
  2024-06-26 23:07 ` [PATCH 4/6] drm/bridge: samsung-dsim: " Fabio Estevam
@ 2024-09-13  7:49   ` neil.armstrong
  0 siblings, 0 replies; 14+ messages in thread
From: neil.armstrong @ 2024-09-13  7:49 UTC (permalink / raw)
  To: Fabio Estevam, rfoss; +Cc: victor.liu, dri-devel, Fabio Estevam

On 27/06/2024 01:07, Fabio Estevam wrote:
> From: Fabio Estevam <festevam@denx.de>
> 
> Replace SET_RUNTIME_PM_OPS with its modern RUNTIME_PM_OPS() alternative.
> 
> The combined usage of pm_ptr() and RUNTIME_PM_OPS()
> allows the compiler to evaluate if the runtime suspend/resume() functions
> are used at build time or are simply dead code.
> 
> This allows removing the __maybe_unused notation from the runtime
> suspend/resume() functions.
> 
> Signed-off-by: Fabio Estevam <festevam@denx.de>
> ---
>   drivers/gpu/drm/bridge/samsung-dsim.c | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/bridge/samsung-dsim.c b/drivers/gpu/drm/bridge/samsung-dsim.c
> index e7e53a9e42af..73ccf21ae446 100644
> --- a/drivers/gpu/drm/bridge/samsung-dsim.c
> +++ b/drivers/gpu/drm/bridge/samsung-dsim.c
> @@ -2043,7 +2043,7 @@ void samsung_dsim_remove(struct platform_device *pdev)
>   }
>   EXPORT_SYMBOL_GPL(samsung_dsim_remove);
>   
> -static int __maybe_unused samsung_dsim_suspend(struct device *dev)
> +static int samsung_dsim_suspend(struct device *dev)
>   {
>   	struct samsung_dsim *dsi = dev_get_drvdata(dev);
>   	const struct samsung_dsim_driver_data *driver_data = dsi->driver_data;
> @@ -2073,7 +2073,7 @@ static int __maybe_unused samsung_dsim_suspend(struct device *dev)
>   	return 0;
>   }
>   
> -static int __maybe_unused samsung_dsim_resume(struct device *dev)
> +static int samsung_dsim_resume(struct device *dev)
>   {
>   	struct samsung_dsim *dsi = dev_get_drvdata(dev);
>   	const struct samsung_dsim_driver_data *driver_data = dsi->driver_data;
> @@ -2108,7 +2108,7 @@ static int __maybe_unused samsung_dsim_resume(struct device *dev)
>   }
>   
>   const struct dev_pm_ops samsung_dsim_pm_ops = {
> -	SET_RUNTIME_PM_OPS(samsung_dsim_suspend, samsung_dsim_resume, NULL)
> +	RUNTIME_PM_OPS(samsung_dsim_suspend, samsung_dsim_resume, NULL)
>   	SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
>   				pm_runtime_force_resume)
>   };
> @@ -2142,7 +2142,7 @@ static struct platform_driver samsung_dsim_driver = {
>   	.remove_new = samsung_dsim_remove,
>   	.driver = {
>   		   .name = "samsung-dsim",
> -		   .pm = &samsung_dsim_pm_ops,
> +		   .pm = pm_ptr(&samsung_dsim_pm_ops),
>   		   .of_match_table = samsung_dsim_of_match,
>   	},
>   };

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

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

* Re: [PATCH 5/6] drm/bridge: dw-hdmi-cec: Switch to SYSTEM_SLEEP_PM_OPS()
  2024-06-26 23:07 ` [PATCH 5/6] drm/bridge: dw-hdmi-cec: Switch to SYSTEM_SLEEP_PM_OPS() Fabio Estevam
@ 2024-09-13  7:49   ` neil.armstrong
  0 siblings, 0 replies; 14+ messages in thread
From: neil.armstrong @ 2024-09-13  7:49 UTC (permalink / raw)
  To: Fabio Estevam, rfoss; +Cc: victor.liu, dri-devel, Fabio Estevam

On 27/06/2024 01:07, Fabio Estevam wrote:
> From: Fabio Estevam <festevam@denx.de>
> 
> Replace SET_SYSTEM_SLEEP_PM_OPS with its modern SYSTEM_SLEEP_PM_OPS()
> alternative.
> 
> The combined usage of pm_ptr() and SYSTEM_SLEEP_PM_OPS()
> allows the compiler to evaluate if the runtime suspend/resume() functions
> are used at build time or are simply dead code.
> 
> This allows removing the __maybe_unused notation from the runtime
> suspend/resume() functions.
> 
> Signed-off-by: Fabio Estevam <festevam@denx.de>
> ---
>   drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c
> index 673661160e54..d4614de1ae1e 100644
> --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c
> +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c
> @@ -312,7 +312,7 @@ static void dw_hdmi_cec_remove(struct platform_device *pdev)
>   	cec_unregister_adapter(cec->adap);
>   }
>   
> -static int __maybe_unused dw_hdmi_cec_resume(struct device *dev)
> +static int dw_hdmi_cec_resume(struct device *dev)
>   {
>   	struct dw_hdmi_cec *cec = dev_get_drvdata(dev);
>   
> @@ -328,7 +328,7 @@ static int __maybe_unused dw_hdmi_cec_resume(struct device *dev)
>   	return 0;
>   }
>   
> -static int __maybe_unused dw_hdmi_cec_suspend(struct device *dev)
> +static int dw_hdmi_cec_suspend(struct device *dev)
>   {
>   	struct dw_hdmi_cec *cec = dev_get_drvdata(dev);
>   
> @@ -341,7 +341,7 @@ static int __maybe_unused dw_hdmi_cec_suspend(struct device *dev)
>   }
>   
>   static const struct dev_pm_ops dw_hdmi_cec_pm = {
> -	SET_SYSTEM_SLEEP_PM_OPS(dw_hdmi_cec_suspend, dw_hdmi_cec_resume)
> +	SYSTEM_SLEEP_PM_OPS(dw_hdmi_cec_suspend, dw_hdmi_cec_resume)
>   };
>   
>   static struct platform_driver dw_hdmi_cec_driver = {
> @@ -349,7 +349,7 @@ static struct platform_driver dw_hdmi_cec_driver = {
>   	.remove_new = dw_hdmi_cec_remove,
>   	.driver = {
>   		.name = "dw-hdmi-cec",
> -		.pm = &dw_hdmi_cec_pm,
> +		.pm = pm_ptr(&dw_hdmi_cec_pm),
>   	},
>   };
>   module_platform_driver(dw_hdmi_cec_driver);

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

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

* Re: [PATCH 6/6] drm/bridge: imx8qxp-ldb: Switch to RUNTIME_PM_OPS()
  2024-06-26 23:07 ` [PATCH 6/6] drm/bridge: imx8qxp-ldb: Switch to RUNTIME_PM_OPS() Fabio Estevam
@ 2024-09-13  7:49   ` neil.armstrong
  0 siblings, 0 replies; 14+ messages in thread
From: neil.armstrong @ 2024-09-13  7:49 UTC (permalink / raw)
  To: Fabio Estevam, rfoss; +Cc: victor.liu, dri-devel, Fabio Estevam

On 27/06/2024 01:07, Fabio Estevam wrote:
> From: Fabio Estevam <festevam@denx.de>
> 
> Replace SET_RUNTIME_PM_OPS with its modern RUNTIME_PM_OPS() alternative.
> 
> The combined usage of pm_ptr() and RUNTIME_PM_OPS()
> allows the compiler to evaluate if the runtime suspend/resume() functions
> are used at build time or are simply dead code.
> 
> This allows removing the __maybe_unused notation from the runtime
> suspend/resume() functions.
> 
> Signed-off-by: Fabio Estevam <festevam@denx.de>
> ---
>   drivers/gpu/drm/bridge/imx/imx8qxp-ldb.c | 9 ++++-----
>   1 file changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/bridge/imx/imx8qxp-ldb.c b/drivers/gpu/drm/bridge/imx/imx8qxp-ldb.c
> index 7984da9c0a35..b33011f397f0 100644
> --- a/drivers/gpu/drm/bridge/imx/imx8qxp-ldb.c
> +++ b/drivers/gpu/drm/bridge/imx/imx8qxp-ldb.c
> @@ -678,12 +678,12 @@ static void imx8qxp_ldb_remove(struct platform_device *pdev)
>   	pm_runtime_disable(&pdev->dev);
>   }
>   
> -static int __maybe_unused imx8qxp_ldb_runtime_suspend(struct device *dev)
> +static int imx8qxp_ldb_runtime_suspend(struct device *dev)
>   {
>   	return 0;
>   }
>   
> -static int __maybe_unused imx8qxp_ldb_runtime_resume(struct device *dev)
> +static int imx8qxp_ldb_runtime_resume(struct device *dev)
>   {
>   	struct imx8qxp_ldb *imx8qxp_ldb = dev_get_drvdata(dev);
>   	struct ldb *ldb = &imx8qxp_ldb->base;
> @@ -695,8 +695,7 @@ static int __maybe_unused imx8qxp_ldb_runtime_resume(struct device *dev)
>   }
>   
>   static const struct dev_pm_ops imx8qxp_ldb_pm_ops = {
> -	SET_RUNTIME_PM_OPS(imx8qxp_ldb_runtime_suspend,
> -			   imx8qxp_ldb_runtime_resume, NULL)
> +	RUNTIME_PM_OPS(imx8qxp_ldb_runtime_suspend, imx8qxp_ldb_runtime_resume, NULL)
>   };
>   
>   static const struct of_device_id imx8qxp_ldb_dt_ids[] = {
> @@ -709,7 +708,7 @@ static struct platform_driver imx8qxp_ldb_driver = {
>   	.probe	= imx8qxp_ldb_probe,
>   	.remove_new = imx8qxp_ldb_remove,
>   	.driver	= {
> -		.pm = &imx8qxp_ldb_pm_ops,
> +		.pm = pm_ptr(&imx8qxp_ldb_pm_ops),
>   		.name = DRIVER_NAME,
>   		.of_match_table = imx8qxp_ldb_dt_ids,
>   	},

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

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

* Re: [PATCH 1/6] drm/bridge: imx8mp-hdmi-tx: Switch to SYSTEM_SLEEP_PM_OPS()
  2024-06-26 23:06 [PATCH 1/6] drm/bridge: imx8mp-hdmi-tx: Switch to SYSTEM_SLEEP_PM_OPS() Fabio Estevam
                   ` (5 preceding siblings ...)
  2024-08-28 20:20 ` [PATCH 1/6] drm/bridge: imx8mp-hdmi-tx: Switch to SYSTEM_SLEEP_PM_OPS() Fabio Estevam
@ 2024-09-13  7:58 ` neil.armstrong
  2024-09-13  8:12 ` Neil Armstrong
  7 siblings, 0 replies; 14+ messages in thread
From: neil.armstrong @ 2024-09-13  7:58 UTC (permalink / raw)
  To: Fabio Estevam, rfoss; +Cc: victor.liu, dri-devel, Fabio Estevam

On 27/06/2024 01:06, Fabio Estevam wrote:
> From: Fabio Estevam <festevam@denx.de>
> 
> Replace SET_SYSTEM_SLEEP_PM_OPS with its modern SYSTEM_SLEEP_PM_OPS()
> alternative.
> 
> The combined usage of pm_ptr() and SYSTEM_SLEEP_PM_OPS()
> allows the compiler to evaluate if the runtime suspend/resume() functions
> are used at build time or are simply dead code.
> 
> This allows removing the __maybe_unused notation from the runtime
> suspend/resume() functions.
> 
> Signed-off-by: Fabio Estevam <festevam@denx.de>
> ---
>   drivers/gpu/drm/bridge/imx/imx8mp-hdmi-tx.c | 9 ++++-----
>   1 file changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/bridge/imx/imx8mp-hdmi-tx.c b/drivers/gpu/drm/bridge/imx/imx8mp-hdmi-tx.c
> index 13bc570c5473..4a3a8a3ce250 100644
> --- a/drivers/gpu/drm/bridge/imx/imx8mp-hdmi-tx.c
> +++ b/drivers/gpu/drm/bridge/imx/imx8mp-hdmi-tx.c
> @@ -111,12 +111,12 @@ static void imx8mp_dw_hdmi_remove(struct platform_device *pdev)
>   	dw_hdmi_remove(hdmi->dw_hdmi);
>   }
>   
> -static int __maybe_unused imx8mp_dw_hdmi_pm_suspend(struct device *dev)
> +static int imx8mp_dw_hdmi_pm_suspend(struct device *dev)
>   {
>   	return 0;
>   }
>   
> -static int __maybe_unused imx8mp_dw_hdmi_pm_resume(struct device *dev)
> +static int imx8mp_dw_hdmi_pm_resume(struct device *dev)
>   {
>   	struct imx8mp_hdmi *hdmi = dev_get_drvdata(dev);
>   
> @@ -126,8 +126,7 @@ static int __maybe_unused imx8mp_dw_hdmi_pm_resume(struct device *dev)
>   }
>   
>   static const struct dev_pm_ops imx8mp_dw_hdmi_pm_ops = {
> -	SET_SYSTEM_SLEEP_PM_OPS(imx8mp_dw_hdmi_pm_suspend,
> -				imx8mp_dw_hdmi_pm_resume)
> +	SYSTEM_SLEEP_PM_OPS(imx8mp_dw_hdmi_pm_suspend, imx8mp_dw_hdmi_pm_resume)
>   };
>   
>   static const struct of_device_id imx8mp_dw_hdmi_of_table[] = {
> @@ -142,7 +141,7 @@ static struct platform_driver imx8mp_dw_hdmi_platform_driver = {
>   	.driver		= {
>   		.name	= "imx8mp-dw-hdmi-tx",
>   		.of_match_table = imx8mp_dw_hdmi_of_table,
> -		.pm = &imx8mp_dw_hdmi_pm_ops,
> +		.pm = pm_ptr(&imx8mp_dw_hdmi_pm_ops),
>   	},
>   };
>   

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

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

* Re: [PATCH 1/6] drm/bridge: imx8mp-hdmi-tx: Switch to SYSTEM_SLEEP_PM_OPS()
  2024-06-26 23:06 [PATCH 1/6] drm/bridge: imx8mp-hdmi-tx: Switch to SYSTEM_SLEEP_PM_OPS() Fabio Estevam
                   ` (6 preceding siblings ...)
  2024-09-13  7:58 ` neil.armstrong
@ 2024-09-13  8:12 ` Neil Armstrong
  7 siblings, 0 replies; 14+ messages in thread
From: Neil Armstrong @ 2024-09-13  8:12 UTC (permalink / raw)
  To: rfoss, Fabio Estevam; +Cc: victor.liu, dri-devel, Fabio Estevam

Hi,

On Wed, 26 Jun 2024 20:06:59 -0300, Fabio Estevam wrote:
> Replace SET_SYSTEM_SLEEP_PM_OPS with its modern SYSTEM_SLEEP_PM_OPS()
> alternative.
> 
> The combined usage of pm_ptr() and SYSTEM_SLEEP_PM_OPS()
> allows the compiler to evaluate if the runtime suspend/resume() functions
> are used at build time or are simply dead code.
> 
> [...]

Thanks, Applied to https://gitlab.freedesktop.org/drm/misc/kernel.git (drm-misc-next)

[1/6] drm/bridge: imx8mp-hdmi-tx: Switch to SYSTEM_SLEEP_PM_OPS()
      https://gitlab.freedesktop.org/drm/misc/kernel/-/commit/017703370638c07cd6affe661118f697ee113881
[2/6] drm/bridge: imx8qm-ldb: Switch to RUNTIME_PM_OPS()
      https://gitlab.freedesktop.org/drm/misc/kernel/-/commit/02b16c5236e1823047f001b9496e59458c9a7482
[3/6] drm/bridge: imx8qxp-pixel-combiner: Switch to RUNTIME_PM_OPS()
      https://gitlab.freedesktop.org/drm/misc/kernel/-/commit/be227772f7e957f98c3c828459b1221cae84de2e
[4/6] drm/bridge: samsung-dsim: Switch to RUNTIME_PM_OPS()
      https://gitlab.freedesktop.org/drm/misc/kernel/-/commit/5de3c40a1dc503bf915bbc048aa8f5efb369650c
[5/6] drm/bridge: dw-hdmi-cec: Switch to SYSTEM_SLEEP_PM_OPS()
      https://gitlab.freedesktop.org/drm/misc/kernel/-/commit/46fe7763c65674be67828cdbe3a72d6d9b8f8aa7
[6/6] drm/bridge: imx8qxp-ldb: Switch to RUNTIME_PM_OPS()
      https://gitlab.freedesktop.org/drm/misc/kernel/-/commit/8fdd9cb4f8c03a943090ef55ffb552e05c6defc6

-- 
Neil


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

end of thread, other threads:[~2024-09-13  8:12 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-26 23:06 [PATCH 1/6] drm/bridge: imx8mp-hdmi-tx: Switch to SYSTEM_SLEEP_PM_OPS() Fabio Estevam
2024-06-26 23:07 ` [PATCH 2/6] drm/bridge: imx8qm-ldb: Switch to RUNTIME_PM_OPS() Fabio Estevam
2024-09-13  7:49   ` neil.armstrong
2024-06-26 23:07 ` [PATCH 3/6] drm/bridge: imx8qxp-pixel-combiner: " Fabio Estevam
2024-09-13  7:49   ` neil.armstrong
2024-06-26 23:07 ` [PATCH 4/6] drm/bridge: samsung-dsim: " Fabio Estevam
2024-09-13  7:49   ` neil.armstrong
2024-06-26 23:07 ` [PATCH 5/6] drm/bridge: dw-hdmi-cec: Switch to SYSTEM_SLEEP_PM_OPS() Fabio Estevam
2024-09-13  7:49   ` neil.armstrong
2024-06-26 23:07 ` [PATCH 6/6] drm/bridge: imx8qxp-ldb: Switch to RUNTIME_PM_OPS() Fabio Estevam
2024-09-13  7:49   ` neil.armstrong
2024-08-28 20:20 ` [PATCH 1/6] drm/bridge: imx8mp-hdmi-tx: Switch to SYSTEM_SLEEP_PM_OPS() Fabio Estevam
2024-09-13  7:58 ` neil.armstrong
2024-09-13  8:12 ` Neil Armstrong

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.