Skip to contentSkip to conversation

drm/meson: pm resume add return errno branch

PATCH Applied Bernard Zhao 2 participants 3 messages Apr 28, 2020 – May 13, 2020

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

PATCH 1/1 drm/meson: pm resume add return errno branch

pm_resump api did not handle drm_mode_config_helper_resume error. This change add handle to return drm_mode_config_helper_resume`s error number. This code logic is aligned with api pm_suspend. After this change, the code maybe a bit readable.

---
 drivers/gpu/drm/meson/meson_drv.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/meson/meson_drv.c +1 -3
index b5f5eb7b4bb9..8c2e1b47e81a 100644
@@ -412,9 +412,7 @@ static int __maybe_unused meson_drv_pm_resume(struct device *dev)
 	if (priv->afbcd.ops)
 		priv->afbcd.ops->init(priv);
 
-	drm_mode_config_helper_resume(priv->drm);
-
-	return 0;
+	return drm_mode_config_helper_resume(priv->drm);
 }
 
 static int compare_of(struct device *dev, void *data)
Signature · 1 line
2.26.2
author
#1 lore raw

From: Bernard Zhao <[email protected]>
Date: 2020-04-28 21:17:47
To: Neil Armstrong <[email protected]>,David Airlie <[email protected]>,Daniel Vetter <[email protected]>,Kevin Hilman <[email protected]>,[email protected],[email protected],[email protected],[email protected]
Cc: [email protected],Bernard Zhao <[email protected]>
Subject: [PATCH] drm/meson: pm resume add return errno branch>pm_resump api did not handle drm_mode_config_helper_resume error.

Quoted 27 lines

This change add handle to return drm_mode_config_helper_resume`s error number. This code logic is aligned with api pm_suspend. After this change, the code maybe a bit readable.

---
drivers/gpu/drm/meson/meson_drv.c | 4 +---

1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/meson/meson_drv.c +1 -3
index b5f5eb7b4bb9..8c2e1b47e81a 100644
@@ -412,9 +412,7 @@ static int __maybe_unused meson_drv_pm_resume(struct device *dev)
 	if (priv->afbcd.ops)
 		priv->afbcd.ops->init(priv);
 
-	drm_mode_config_helper_resume(priv->drm);
-
-	return 0;
+	return drm_mode_config_helper_resume(priv->drm);
 }
 
 static int compare_of(struct device *dev, void *data)
Signature · 1 line
2.26.2
#2 lore raw
In reply to Bernard Zhao
Quoted 16 lines · Bernard Zhao

pm_resump api did not handle drm_mode_config_helper_resume error. This change add handle to return drm_mode_config_helper_resume`s error number. This code logic is aligned with api pm_suspend. After this change, the code maybe a bit readable.

---
 drivers/gpu/drm/meson/meson_drv.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/meson/meson_drv.c +0 -0
index b5f5eb7b4bb9..8c2e1b47e81a 100644

drivers/gpu/drm/meson/meson_drv.c static int __maybe_unused meson_drv_pm_resume(struct device *dev) · line 418

Quoted 10 lines
drivers/gpu/drm/meson/meson_drv.c +1 -3
@@ -412,9 +412,7 @@ static int __maybe_unused meson_drv_pm_resume(struct device *dev)
 	if (priv->afbcd.ops)
 		priv->afbcd.ops->init(priv);
 
-	drm_mode_config_helper_resume(priv->drm);
-
-	return 0;
+	return drm_mode_config_helper_resume(priv->drm);
 }
 
 static int compare_of(struct device *dev, void *data)

Applied to drm-misc-fixes

Thanks,
Neil