dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2] drm/tegra: sor: Don't warn on probe deferral
@ 2020-11-04  9:23 Jon Hunter
  2020-11-04 10:49 ` Dmitry Osipenko
  0 siblings, 1 reply; 3+ messages in thread
From: Jon Hunter @ 2020-11-04  9:23 UTC (permalink / raw)
  To: Thierry Reding
  Cc: David Airlie, linux-kernel, dri-devel, Jon Hunter, linux-tegra

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.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
---

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

 drivers/gpu/drm/tegra/sor.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c
index e88a17c2937f..898a80ca37fa 100644
--- a/drivers/gpu/drm/tegra/sor.c
+++ b/drivers/gpu/drm/tegra/sor.c
@@ -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);
-- 
2.25.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH V2] drm/tegra: sor: Don't warn on probe deferral
  2020-11-04  9:23 [PATCH V2] drm/tegra: sor: Don't warn on probe deferral Jon Hunter
@ 2020-11-04 10:49 ` Dmitry Osipenko
  2020-11-04 19:12   ` Jon Hunter
  0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Osipenko @ 2020-11-04 10:49 UTC (permalink / raw)
  To: Jon Hunter, Thierry Reding
  Cc: David Airlie, linux-tegra, linux-kernel, dri-devel

04.11.2020 12:23, Jon Hunter пишет:
> 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.
> 
> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
> ---
> 
> Changes since V1:
> - This time, I actually validated it!
> 
>  drivers/gpu/drm/tegra/sor.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c
> index e88a17c2937f..898a80ca37fa 100644
> --- a/drivers/gpu/drm/tegra/sor.c
> +++ b/drivers/gpu/drm/tegra/sor.c
> @@ -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
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH V2] drm/tegra: sor: Don't warn on probe deferral
  2020-11-04 10:49 ` Dmitry Osipenko
@ 2020-11-04 19:12   ` Jon Hunter
  0 siblings, 0 replies; 3+ messages in thread
From: Jon Hunter @ 2020-11-04 19:12 UTC (permalink / raw)
  To: Dmitry Osipenko, Thierry Reding
  Cc: David Airlie, linux-tegra, linux-kernel, dri-devel


On 04/11/2020 10:49, Dmitry Osipenko wrote:
> 04.11.2020 12:23, Jon Hunter пишет:
>> 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.
>>
>> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
>> ---
>>
>> Changes since V1:
>> - This time, I actually validated it!
>>
>>  drivers/gpu/drm/tegra/sor.c | 7 +++----
>>  1 file changed, 3 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c
>> index e88a17c2937f..898a80ca37fa 100644
>> --- a/drivers/gpu/drm/tegra/sor.c
>> +++ b/drivers/gpu/drm/tegra/sor.c
>> @@ -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? :)
Indeed! Thanks for catching. Trying to do to many things at the same
time. I should have learned by now!

Jon

-- 
nvpublic
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2020-11-04 19:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-04  9:23 [PATCH V2] drm/tegra: sor: Don't warn on probe deferral Jon Hunter
2020-11-04 10:49 ` Dmitry Osipenko
2020-11-04 19:12   ` Jon Hunter

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