linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/tegra: hdmi: probe deferral error reporting
@ 2018-07-20  7:55 Marcel Ziswiler
  2018-07-23 20:49 ` Lucas Stach
  0 siblings, 1 reply; 3+ messages in thread
From: Marcel Ziswiler @ 2018-07-20  7:55 UTC (permalink / raw)
  To: linux-tegra
  Cc: Marcel Ziswiler, Thierry Reding, Jonathan Hunter, linux-kernel,
	dri-devel, David Airlie

From: Marcel Ziswiler <marcel.ziswiler@toradex.com>

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

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>

---

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

diff --git a/drivers/gpu/drm/tegra/hdmi.c b/drivers/gpu/drm/tegra/hdmi.c
index 0082468f703c..94c182dbb6d0 100644
--- a/drivers/gpu/drm/tegra/hdmi.c
+++ b/drivers/gpu/drm/tegra/hdmi.c
@@ -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.14.4


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

* Re: [PATCH] drm/tegra: hdmi: probe deferral error reporting
  2018-07-20  7:55 [PATCH] drm/tegra: hdmi: probe deferral error reporting Marcel Ziswiler
@ 2018-07-23 20:49 ` Lucas Stach
  2018-07-24  5:55   ` Marcel Ziswiler
  0 siblings, 1 reply; 3+ messages in thread
From: Lucas Stach @ 2018-07-23 20:49 UTC (permalink / raw)
  To: Marcel Ziswiler, linux-tegra
  Cc: Marcel Ziswiler, linux-kernel, dri-devel, Jonathan Hunter,
	David Airlie, Thierry Reding

Am Freitag, den 20.07.2018, 09:55 +0200 schrieb Marcel Ziswiler:
> From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
> 
> 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

> 
> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
> 
> ---
> 
>  drivers/gpu/drm/tegra/hdmi.c | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/tegra/hdmi.c b/drivers/gpu/drm/tegra/hdmi.c
> index 0082468f703c..94c182dbb6d0 100644
> --- a/drivers/gpu/drm/tegra/hdmi.c
> +++ b/drivers/gpu/drm/tegra/hdmi.c
> @@ -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");

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

* Re: [PATCH] drm/tegra: hdmi: probe deferral error reporting
  2018-07-23 20:49 ` Lucas Stach
@ 2018-07-24  5:55   ` Marcel Ziswiler
  0 siblings, 0 replies; 3+ messages in thread
From: Marcel Ziswiler @ 2018-07-24  5:55 UTC (permalink / raw)
  To: Lucas Stach, linux-tegra
  Cc: Marcel Ziswiler, linux-kernel, dri-devel, Jonathan Hunter,
	David Airlie, Thierry Reding



On July 23, 2018 10:49:15 PM GMT+02:00, Lucas Stach <dev@lynxeye.de> wrote:
>Am Freitag, den 20.07.2018, 09:55 +0200 schrieb Marcel Ziswiler:
>> From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
>> 
>> 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!

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

Ok, agreed. Will send a v2.

>Regards,
>Lucas
>
>> 
>> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
>> 
>> ---
>> 
>>  drivers/gpu/drm/tegra/hdmi.c | 10 ++++++----
>>  1 file changed, 6 insertions(+), 4 deletions(-)
>> 
>> diff --git a/drivers/gpu/drm/tegra/hdmi.c
>b/drivers/gpu/drm/tegra/hdmi.c
>> index 0082468f703c..94c182dbb6d0 100644
>> --- a/drivers/gpu/drm/tegra/hdmi.c
>> +++ b/drivers/gpu/drm/tegra/hdmi.c
>> @@ -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");

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

end of thread, other threads:[~2018-07-24  5:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-20  7:55 [PATCH] drm/tegra: hdmi: probe deferral error reporting Marcel Ziswiler
2018-07-23 20:49 ` Lucas Stach
2018-07-24  5:55   ` Marcel Ziswiler

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).