Skip to contentSkip to conversation

drm/tegra: hdmi: probe deferral error reporting

PATCH Superseded Marcel Ziswiler 2 participants 3 messages Jul 20, 2018 – Jul 24, 2018

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/tegra: hdmi: probe deferral error reporting

From: Marcel Ziswiler <[email protected]>

Actually report the error code from devm_regulator_get() which may as well just be a probe deferral.

---

 drivers/gpu/drm/tegra/hdmi.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
drivers/gpu/drm/tegra/hdmi.c +6 -4
index 0082468f703c..94c182dbb6d0 100644
@@ -1693,14 +1693,16 @@ static int tegra_hdmi_probe(struct platform_device *pdev)
 
 	hdmi->hdmi = devm_regulator_get(&pdev->dev, "hdmi");
 	if (IS_ERR(hdmi->hdmi)) {
-		dev_err(&pdev->dev, "failed to get HDMI regulator\n");
-		return PTR_ERR(hdmi->hdmi);
+		err = PTR_ERR(hdmi->hdmi);
+		dev_err(&pdev->dev, "failed to get HDMI regulator: %d\n", err);
+		return err;
 	}
 
 	hdmi->pll = devm_regulator_get(&pdev->dev, "pll");
 	if (IS_ERR(hdmi->pll)) {
-		dev_err(&pdev->dev, "failed to get PLL regulator\n");
-		return PTR_ERR(hdmi->pll);
+		err = PTR_ERR(hdmi->pll);
+		dev_err(&pdev->dev, "failed to get PLL regulator: %d\n", err);
+		return err;
 	}
 
 	hdmi->vdd = devm_regulator_get(&pdev->dev, "vdd");
Signature · 1 line
2.14.4
#1 lore raw

Am Freitag, den 20.07.2018, 09:55 +0200 schrieb Marcel Ziswiler:

Quoted 4 lines

From: Marcel Ziswiler <[email protected]>

Actually report the error code from devm_regulator_get() which may as well just be a probe deferral.

This is still noisy, so while you are changing this I would prefer if this wouldn't print the error message if it's a simple probe deferral.

Suppressing the log message in that case gets us much cleaner kernel logs, where real errors stand out.

Regards,
Lucas

Quoted 33 lines

---

 drivers/gpu/drm/tegra/hdmi.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
drivers/gpu/drm/tegra/hdmi.c +6 -4
index 0082468f703c..94c182dbb6d0 100644
@@ -1693,14 +1693,16 @@ static int tegra_hdmi_probe(struct platform_device *pdev)
 
 	hdmi->hdmi = devm_regulator_get(&pdev->dev, "hdmi");
 	if (IS_ERR(hdmi->hdmi)) {
-		dev_err(&pdev->dev, "failed to get HDMI regulator\n");
-		return PTR_ERR(hdmi->hdmi);
+		err = PTR_ERR(hdmi->hdmi);
+		dev_err(&pdev->dev, "failed to get HDMI regulator: %d\n", err);
+		return err;
 	}
 
 	hdmi->pll = devm_regulator_get(&pdev->dev, "pll");
 	if (IS_ERR(hdmi->pll)) {
-		dev_err(&pdev->dev, "failed to get PLL regulator\n");
-		return PTR_ERR(hdmi->pll);
+		err = PTR_ERR(hdmi->pll);
+		dev_err(&pdev->dev, "failed to get PLL regulator: %d\n", err);
+		return err;
 	}
 
 	hdmi->vdd = devm_regulator_get(&pdev->dev, "vdd");
#2 lore raw
Quoted 8 lines · Lucas Stach

Am Freitag, den 20.07.2018, 09:55 +0200 schrieb Marcel Ziswiler:

Quoted 4 lines

From: Marcel Ziswiler <[email protected]>

Actually report the error code from devm_regulator_get() which may as well just be a probe deferral.

This is still noisy, so while you are changing this I would prefer if this wouldn't print the error message if it's a simple probe deferral.

Yeah, trust me, I'm not the inventor of this probe deferral disaster!

Quoted 2 lines

Suppressing the log message in that case gets us much cleaner kernel logs, where real errors stand out.

Ok, agreed. Will send a v2.

Quoted 38 lines

Regards,
Lucas

Review

Quoted 9 lines

---

 drivers/gpu/drm/tegra/hdmi.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
(quoted diff) +0 -0

b/drivers/gpu/drm/tegra/hdmi.c

drivers/gpu/drm/tegra/hdmi.c static int tegra_hdmi_probe(struct

Quoted 4 lines

index 0082468f703c..94c182dbb6d0 100644

drivers/gpu/drm/tegra/hdmi.c +0 -0
@@ -1693,14 +1693,16 @@ static int tegra_hdmi_probe(struct

platform_device *pdev)

Quoted 20 lines
drivers/gpu/drm/tegra/hdmi.c +6 -4
 	hdmi->hdmi = devm_regulator_get(&pdev->dev, "hdmi");
 	if (IS_ERR(hdmi->hdmi)) {
-		dev_err(&pdev->dev, "failed to get HDMI regulator\n");
-		return PTR_ERR(hdmi->hdmi);
+		err = PTR_ERR(hdmi->hdmi);
+		dev_err(&pdev->dev, "failed to get HDMI regulator: %d\n", err);
+		return err;
 	}
 
 	hdmi->pll = devm_regulator_get(&pdev->dev, "pll");
 	if (IS_ERR(hdmi->pll)) {
-		dev_err(&pdev->dev, "failed to get PLL regulator\n");
-		return PTR_ERR(hdmi->pll);
+		err = PTR_ERR(hdmi->pll);
+		dev_err(&pdev->dev, "failed to get PLL regulator: %d\n", err);
+		return err;
 	}
 
 	hdmi->vdd = devm_regulator_get(&pdev->dev, "vdd");