Skip to contentSkip to conversation

drm/tegra: sor: Don't warn on probe deferral

PATCH Superseded Jon Hunter 2 participants 3 messages Nov 4, 2020

Subsystems (3)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Jon Hunter

author maintainer
#0 lore raw

PATCH v2 1/1 drm/tegra: sor: Don't warn on probe deferral

Deferred probe is an expected return value for tegra_output_probe(). Given that the driver deals with it properly, there's no need to output a warning that may potentially confuse users.

---

Changes since V1:
- This time, I actually validated it!

 drivers/gpu/drm/tegra/sor.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/gpu/drm/tegra/sor.c +3 -4
index e88a17c2937f..898a80ca37fa 100644
@@ -3764,10 +3764,9 @@ static int tegra_sor_probe(struct platform_device *pdev)
 		return err;
 
 	err = tegra_output_probe(&sor->output);
-	if (err < 0) {
-		dev_err(&pdev->dev, "failed to probe output: %d\n", err);
-		return err;
-	}
+	if (err < 0)
+		return dev_err_probe(&pdev->dev, err,
+				     "failed to probe output: %d\n", err);
 
 	if (sor->ops && sor->ops->probe) {
 		err = sor->ops->probe(sor);
Signature · 1 line
2.25.1
#1 lore raw

04.11.2020 12:23, Jon Hunter пишет:

Quoted 18 lines

Deferred probe is an expected return value for tegra_output_probe(). Given that the driver deals with it properly, there's no need to output a warning that may potentially confuse users.

---

Changes since V1:
- This time, I actually validated it!

 drivers/gpu/drm/tegra/sor.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/gpu/drm/tegra/sor.c +0 -0
index e88a17c2937f..898a80ca37fa 100644

drivers/gpu/drm/tegra/sor.c static int tegra_sor_probe(struct platform_device *pdev) · line 3769

Quoted 10 lines
drivers/gpu/drm/tegra/sor.c +3 -4
@@ -3764,10 +3764,9 @@ static int tegra_sor_probe(struct platform_device *pdev)
 		return err;
 
 	err = tegra_output_probe(&sor->output);
-	if (err < 0) {
-		dev_err(&pdev->dev, "failed to probe output: %d\n", err);
-		return err;
-	}
+	if (err < 0)
+		return dev_err_probe(&pdev->dev, err,
+				     "failed to probe output: %d\n", err);

Hello Jon,

There is no need to duplicate the error code in the message [1]. Perhaps worth making a v3? :)

[1]
https://elixir.bootlin.com/linux/v5.10-rc2/source/drivers/base/core.c#L4240

author maintainer
#2 lore raw
Quoted 32 lines · Dmitry Osipenko

04.11.2020 12:23, Jon Hunter пишет:

Quoted 18 lines

Deferred probe is an expected return value for tegra_output_probe(). Given that the driver deals with it properly, there's no need to output a warning that may potentially confuse users.

---

Changes since V1:
- This time, I actually validated it!

 drivers/gpu/drm/tegra/sor.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/gpu/drm/tegra/sor.c +0 -0
index e88a17c2937f..898a80ca37fa 100644

drivers/gpu/drm/tegra/sor.c static int tegra_sor_probe(struct platform_device *pdev) · line 3769

Quoted 10 lines
drivers/gpu/drm/tegra/sor.c +3 -4
@@ -3764,10 +3764,9 @@ static int tegra_sor_probe(struct platform_device *pdev)
 		return err;
 
 	err = tegra_output_probe(&sor->output);
-	if (err < 0) {
-		dev_err(&pdev->dev, "failed to probe output: %d\n", err);
-		return err;
-	}
+	if (err < 0)
+		return dev_err_probe(&pdev->dev, err,
+				     "failed to probe output: %d\n", err);

Hello Jon,

Quoted 2 lines

There is no need to duplicate the error code in the message [1]. Perhaps worth making a v3? :)

Indeed! Thanks for catching. Trying to do to many things at the same time. I should have learned by now!

Jon

Signature · 1 line
nvpublic