Skip to contentSkip to conversation

drm/panfrost: no need to display probe deferred error

PATCH In review Clément Péron 2 participants 2 messages Dec 5, 2019 – Dec 6, 2019

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

PATCH 1/1 drm/panfrost: no need to display probe deferred error

Panfrost driver is shouting an error if the regulator init return an -EPROBE_DEFFER. This is a not a real error and it doesn't require to be display.

Check if the error is not an EPROBE_DEFFER before displaying it.

---
 drivers/gpu/drm/panfrost/panfrost_device.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/panfrost/panfrost_device.c +4 -2
index 238fb6d54df4..00cef062c35d 100644
@@ -92,7 +92,8 @@ static int panfrost_regulator_init(struct panfrost_device *pfdev)
 	pfdev->regulator = devm_regulator_get(pfdev->dev, "mali");
 	if (IS_ERR(pfdev->regulator)) {
 		ret = PTR_ERR(pfdev->regulator);
-		dev_err(pfdev->dev, "failed to get regulator: %d\n", ret);
+		if (ret != -EPROBE_DEFER)
+			dev_err(pfdev->dev, "failed to get regulator: %d\n", ret);
 		return ret;
 	}
 
@@ -130,7 +131,8 @@ int panfrost_device_init(struct panfrost_device *pfdev)
 
 	err = panfrost_regulator_init(pfdev);
 	if (err) {
-		dev_err(pfdev->dev, "regulator init failed %d\n", err);
+		if (err != -EPROBE_DEFER)
+			dev_err(pfdev->dev, "regulator init failed %d\n", err);
 		goto err_out0;
 	}
 
Signature · 7 lines
2.20.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 26 lines · Clément Péron

Panfrost driver is shouting an error if the regulator init return an -EPROBE_DEFFER. This is a not a real error and it doesn't require to be display.

Check if the error is not an EPROBE_DEFFER before displaying it.

---
 drivers/gpu/drm/panfrost/panfrost_device.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/panfrost/panfrost_device.c +2 -1
index 238fb6d54df4..00cef062c35d 100644
@@ -92,7 +92,8 @@ static int panfrost_regulator_init(struct panfrost_device *pfdev)
 	pfdev->regulator = devm_regulator_get(pfdev->dev, "mali");
 	if (IS_ERR(pfdev->regulator)) {
 		ret = PTR_ERR(pfdev->regulator);
-		dev_err(pfdev->dev, "failed to get regulator: %d\n", ret);
+		if (ret != -EPROBE_DEFER)
+			dev_err(pfdev->dev, "failed to get regulator: %d\n", ret);
 		return ret;
 	}
 

drivers/gpu/drm/panfrost/panfrost_device.c int panfrost_device_init(struct panfrost_device *pfdev) · line 135

Quoted 6 lines
drivers/gpu/drm/panfrost/panfrost_device.c +2 -1
@@ -130,7 +131,8 @@ int panfrost_device_init(struct panfrost_device *pfdev)
 
 	err = panfrost_regulator_init(pfdev);
 	if (err) {
-		dev_err(pfdev->dev, "regulator init failed %d\n", err);
+		if (err != -EPROBE_DEFER)
+			dev_err(pfdev->dev, "regulator init failed %d\n", err);

You could actually drop this dev_err() altogether - panfrost_regulator_init() will always produce it's own dev_err() output if it returns non-zero.

Either way:

drivers/gpu/drm/panfrost/panfrost_device.c int panfrost_device_init(struct panfrost_device *pfdev) · line 138

Quoted 4 lines
drivers/gpu/drm/panfrost/panfrost_device.c +0 -0
 		goto err_out0;
 	}
 

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel