linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/panfrost: no need to display probe deferred error
@ 2019-12-05 22:11 Clément Péron
  2019-12-06 10:02 ` Steven Price
  0 siblings, 1 reply; 2+ messages in thread
From: Clément Péron @ 2019-12-05 22:11 UTC (permalink / raw)
  To: Rob Herring, Tomeu Vizoso, Steven Price, Alyssa Rosenzweig
  Cc: Clément Péron, linux-arm-kernel, dri-devel

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.

Signed-off-by: Clément Péron <peron.clem@gmail.com>
---
 drivers/gpu/drm/panfrost/panfrost_device.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/panfrost/panfrost_device.c b/drivers/gpu/drm/panfrost/panfrost_device.c
index 238fb6d54df4..00cef062c35d 100644
--- a/drivers/gpu/drm/panfrost/panfrost_device.c
+++ b/drivers/gpu/drm/panfrost/panfrost_device.c
@@ -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;
 	}
 
-- 
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] drm/panfrost: no need to display probe deferred error
  2019-12-05 22:11 [PATCH] drm/panfrost: no need to display probe deferred error Clément Péron
@ 2019-12-06 10:02 ` Steven Price
  0 siblings, 0 replies; 2+ messages in thread
From: Steven Price @ 2019-12-06 10:02 UTC (permalink / raw)
  To: Clément Péron, Rob Herring, Tomeu Vizoso, Alyssa Rosenzweig
  Cc: dri-devel, linux-arm-kernel

On 05/12/2019 22:11, Clément Péron wrote:
> 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.
> 
> Signed-off-by: Clément Péron <peron.clem@gmail.com>
> ---
>  drivers/gpu/drm/panfrost/panfrost_device.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/panfrost/panfrost_device.c b/drivers/gpu/drm/panfrost/panfrost_device.c
> index 238fb6d54df4..00cef062c35d 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_device.c
> +++ b/drivers/gpu/drm/panfrost/panfrost_device.c
> @@ -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);

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:

Reviewed-by: Steven Price <steven.price@arm.com>

>  		goto err_out0;
>  	}
>  
> 


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2019-12-06 10:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-05 22:11 [PATCH] drm/panfrost: no need to display probe deferred error Clément Péron
2019-12-06 10:02 ` Steven Price

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).