All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] clk: tegra: probe deferral error reporting
@ 2018-07-20  7:54 Marcel Ziswiler
  2018-07-25 23:24   ` Stephen Boyd
  0 siblings, 1 reply; 9+ messages in thread
From: Marcel Ziswiler @ 2018-07-20  7:54 UTC (permalink / raw)
  To: linux-tegra, linux-kernel
  Cc: Marcel Ziswiler, Thierry Reding, Stephen Boyd, Prashant Gaikwad,
	Peter De Schrijver, Jonathan Hunter, Michael Turquette,
	linux-clk

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/clk/tegra/clk-dfll.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/tegra/clk-dfll.c b/drivers/clk/tegra/clk-dfll.c
index 48ee43734e05..b2123084e175 100644
--- a/drivers/clk/tegra/clk-dfll.c
+++ b/drivers/clk/tegra/clk-dfll.c
@@ -1609,8 +1609,9 @@ int tegra_dfll_register(struct platform_device *pdev,
 
 	td->vdd_reg = devm_regulator_get(td->dev, "vdd-cpu");
 	if (IS_ERR(td->vdd_reg)) {
-		dev_err(td->dev, "couldn't get vdd_cpu regulator\n");
-		return PTR_ERR(td->vdd_reg);
+		ret = PTR_ERR(td->vdd_reg);
+		dev_err(td->dev, "couldn't get vdd_cpu regulator: %d\n", ret);
+		return ret;
 	}
 
 	td->dvco_rst = devm_reset_control_get(td->dev, "dvco");
-- 
2.14.4

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

* Re: [PATCH] clk: tegra: probe deferral error reporting
  2018-07-20  7:54 [PATCH] clk: tegra: probe deferral error reporting Marcel Ziswiler
@ 2018-07-25 23:24   ` Stephen Boyd
  0 siblings, 0 replies; 9+ messages in thread
From: Stephen Boyd @ 2018-07-25 23:24 UTC (permalink / raw)
  To: Marcel Ziswiler, linux-kernel, linux-tegra
  Cc: Marcel Ziswiler, Thierry Reding, Prashant Gaikwad,
	Peter De Schrijver, Jonathan Hunter, Michael Turquette,
	linux-clk

Quoting Marcel Ziswiler (2018-07-20 00:54:22)
> 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/clk/tegra/clk-dfll.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/clk/tegra/clk-dfll.c b/drivers/clk/tegra/clk-dfll.c
> index 48ee43734e05..b2123084e175 100644
> --- a/drivers/clk/tegra/clk-dfll.c
> +++ b/drivers/clk/tegra/clk-dfll.c
> @@ -1609,8 +1609,9 @@ int tegra_dfll_register(struct platform_device *pdev,
>  
>         td->vdd_reg = devm_regulator_get(td->dev, "vdd-cpu");
>         if (IS_ERR(td->vdd_reg)) {
> -               dev_err(td->dev, "couldn't get vdd_cpu regulator\n");
> -               return PTR_ERR(td->vdd_reg);
> +               ret = PTR_ERR(td->vdd_reg);
> +               dev_err(td->dev, "couldn't get vdd_cpu regulator: %d\n", ret);

Do you want to know that a probe defer is happening? Usually patches are
sent to make that error path silent.

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

* Re: [PATCH] clk: tegra: probe deferral error reporting
@ 2018-07-25 23:24   ` Stephen Boyd
  0 siblings, 0 replies; 9+ messages in thread
From: Stephen Boyd @ 2018-07-25 23:24 UTC (permalink / raw)
  To: Marcel Ziswiler, linux-kernel, linux-tegra
  Cc: Marcel Ziswiler, Thierry Reding, Prashant Gaikwad,
	Peter De Schrijver, Jonathan Hunter, Michael Turquette,
	linux-clk

Quoting Marcel Ziswiler (2018-07-20 00:54:22)
> 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/clk/tegra/clk-dfll.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> =

> diff --git a/drivers/clk/tegra/clk-dfll.c b/drivers/clk/tegra/clk-dfll.c
> index 48ee43734e05..b2123084e175 100644
> --- a/drivers/clk/tegra/clk-dfll.c
> +++ b/drivers/clk/tegra/clk-dfll.c
> @@ -1609,8 +1609,9 @@ int tegra_dfll_register(struct platform_device *pde=
v,
>  =

>         td->vdd_reg =3D devm_regulator_get(td->dev, "vdd-cpu");
>         if (IS_ERR(td->vdd_reg)) {
> -               dev_err(td->dev, "couldn't get vdd_cpu regulator\n");
> -               return PTR_ERR(td->vdd_reg);
> +               ret =3D PTR_ERR(td->vdd_reg);
> +               dev_err(td->dev, "couldn't get vdd_cpu regulator: %d\n", =
ret);

Do you want to know that a probe defer is happening? Usually patches are
sent to make that error path silent.

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

* Re: [PATCH] clk: tegra: probe deferral error reporting
  2018-07-25 23:24   ` Stephen Boyd
  (?)
@ 2018-07-25 23:42   ` Peter Geis
  2018-07-26  7:31       ` Stephen Boyd
  -1 siblings, 1 reply; 9+ messages in thread
From: Peter Geis @ 2018-07-25 23:42 UTC (permalink / raw)
  To: Stephen Boyd, Marcel Ziswiler, linux-kernel, linux-tegra
  Cc: Marcel Ziswiler, Thierry Reding, Prashant Gaikwad,
	Peter De Schrijver, Jonathan Hunter, Michael Turquette,
	linux-clk

On 7/25/2018 7:24 PM, Stephen Boyd wrote:
> Quoting Marcel Ziswiler (2018-07-20 00:54:22)
>> 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/clk/tegra/clk-dfll.c | 5 +++--
>>   1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/clk/tegra/clk-dfll.c b/drivers/clk/tegra/clk-dfll.c
>> index 48ee43734e05..b2123084e175 100644
>> --- a/drivers/clk/tegra/clk-dfll.c
>> +++ b/drivers/clk/tegra/clk-dfll.c
>> @@ -1609,8 +1609,9 @@ int tegra_dfll_register(struct platform_device *pdev,
>>   
>>          td->vdd_reg = devm_regulator_get(td->dev, "vdd-cpu");
>>          if (IS_ERR(td->vdd_reg)) {
>> -               dev_err(td->dev, "couldn't get vdd_cpu regulator\n");
>> -               return PTR_ERR(td->vdd_reg);
>> +               ret = PTR_ERR(td->vdd_reg);
>> +               dev_err(td->dev, "couldn't get vdd_cpu regulator: %d\n", ret);
> 
> Do you want to know that a probe defer is happening? Usually patches are
> sent to make that error path silent.
> 

Just asking as the newbie here, but shouldn't probe deferral be 
regulated to dev_debug?
Then pass any other error code as dev_err.

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

* Re: [PATCH] clk: tegra: probe deferral error reporting
  2018-07-25 23:42   ` Peter Geis
@ 2018-07-26  7:31       ` Stephen Boyd
  0 siblings, 0 replies; 9+ messages in thread
From: Stephen Boyd @ 2018-07-26  7:31 UTC (permalink / raw)
  To: Marcel Ziswiler, Peter Geis, linux-kernel, linux-tegra
  Cc: Marcel Ziswiler, Thierry Reding, Prashant Gaikwad,
	Peter De Schrijver, Jonathan Hunter, Michael Turquette,
	linux-clk

Quoting Peter Geis (2018-07-25 16:42:34)
> On 7/25/2018 7:24 PM, Stephen Boyd wrote:
> > Quoting Marcel Ziswiler (2018-07-20 00:54:22)
> >> 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/clk/tegra/clk-dfll.c | 5 +++--
> >>   1 file changed, 3 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/drivers/clk/tegra/clk-dfll.c b/drivers/clk/tegra/clk-dfll.c
> >> index 48ee43734e05..b2123084e175 100644
> >> --- a/drivers/clk/tegra/clk-dfll.c
> >> +++ b/drivers/clk/tegra/clk-dfll.c
> >> @@ -1609,8 +1609,9 @@ int tegra_dfll_register(struct platform_device *pdev,
> >>   
> >>          td->vdd_reg = devm_regulator_get(td->dev, "vdd-cpu");
> >>          if (IS_ERR(td->vdd_reg)) {
> >> -               dev_err(td->dev, "couldn't get vdd_cpu regulator\n");
> >> -               return PTR_ERR(td->vdd_reg);
> >> +               ret = PTR_ERR(td->vdd_reg);
> >> +               dev_err(td->dev, "couldn't get vdd_cpu regulator: %d\n", ret);
> > 
> > Do you want to know that a probe defer is happening? Usually patches are
> > sent to make that error path silent.
> > 
> 
> Just asking as the newbie here, but shouldn't probe deferral be 
> regulated to dev_debug?
> Then pass any other error code as dev_err.

Yes probe defer should be relegated to debug level prints. Or really, we
should introduce a more complicated system to make debugging probe defer
errors simpler by informing us which driver is probe defering on what
resource by putting debug prints in each framework that returns probe
defer errors instead of updating each driver that uses these frameworks
and thinks it needs to print errors in these cases. And hide all that
behind some kernel commandline parameter and/or Kconfig option that lets
us turn the prints off all the time if we're not developing drivers or
testing things.

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

* Re: [PATCH] clk: tegra: probe deferral error reporting
@ 2018-07-26  7:31       ` Stephen Boyd
  0 siblings, 0 replies; 9+ messages in thread
From: Stephen Boyd @ 2018-07-26  7:31 UTC (permalink / raw)
  To: Marcel Ziswiler, Peter Geis, linux-kernel, linux-tegra
  Cc: Marcel Ziswiler, Thierry Reding, Prashant Gaikwad,
	Peter De Schrijver, Jonathan Hunter, Michael Turquette,
	linux-clk

Quoting Peter Geis (2018-07-25 16:42:34)
> On 7/25/2018 7:24 PM, Stephen Boyd wrote:
> > Quoting Marcel Ziswiler (2018-07-20 00:54:22)
> >> 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/clk/tegra/clk-dfll.c | 5 +++--
> >>   1 file changed, 3 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/drivers/clk/tegra/clk-dfll.c b/drivers/clk/tegra/clk-dfll=
.c
> >> index 48ee43734e05..b2123084e175 100644
> >> --- a/drivers/clk/tegra/clk-dfll.c
> >> +++ b/drivers/clk/tegra/clk-dfll.c
> >> @@ -1609,8 +1609,9 @@ int tegra_dfll_register(struct platform_device *=
pdev,
> >>   =

> >>          td->vdd_reg =3D devm_regulator_get(td->dev, "vdd-cpu");
> >>          if (IS_ERR(td->vdd_reg)) {
> >> -               dev_err(td->dev, "couldn't get vdd_cpu regulator\n");
> >> -               return PTR_ERR(td->vdd_reg);
> >> +               ret =3D PTR_ERR(td->vdd_reg);
> >> +               dev_err(td->dev, "couldn't get vdd_cpu regulator: %d\n=
", ret);
> > =

> > Do you want to know that a probe defer is happening? Usually patches are
> > sent to make that error path silent.
> > =

> =

> Just asking as the newbie here, but shouldn't probe deferral be =

> regulated to dev_debug?
> Then pass any other error code as dev_err.

Yes probe defer should be relegated to debug level prints. Or really, we
should introduce a more complicated system to make debugging probe defer
errors simpler by informing us which driver is probe defering on what
resource by putting debug prints in each framework that returns probe
defer errors instead of updating each driver that uses these frameworks
and thinks it needs to print errors in these cases. And hide all that
behind some kernel commandline parameter and/or Kconfig option that lets
us turn the prints off all the time if we're not developing drivers or
testing things.

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

* Re: [PATCH] clk: tegra: probe deferral error reporting
  2018-07-26  7:31       ` Stephen Boyd
  (?)
@ 2018-07-26  7:55       ` Stefan Agner
  2018-07-26 16:42           ` Stephen Boyd
  -1 siblings, 1 reply; 9+ messages in thread
From: Stefan Agner @ 2018-07-26  7:55 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: Marcel Ziswiler, Peter Geis, linux-kernel, linux-tegra,
	Marcel Ziswiler, Thierry Reding, Prashant Gaikwad,
	Peter De Schrijver, Jonathan Hunter, Michael Turquette,
	linux-clk, linux-tegra-owner

On 26.07.2018 09:31, Stephen Boyd wrote:
> Quoting Peter Geis (2018-07-25 16:42:34)
>> On 7/25/2018 7:24 PM, Stephen Boyd wrote:
>> > Quoting Marcel Ziswiler (2018-07-20 00:54:22)
>> >> 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/clk/tegra/clk-dfll.c | 5 +++--
>> >>   1 file changed, 3 insertions(+), 2 deletions(-)
>> >>
>> >> diff --git a/drivers/clk/tegra/clk-dfll.c b/drivers/clk/tegra/clk-dfll.c
>> >> index 48ee43734e05..b2123084e175 100644
>> >> --- a/drivers/clk/tegra/clk-dfll.c
>> >> +++ b/drivers/clk/tegra/clk-dfll.c
>> >> @@ -1609,8 +1609,9 @@ int tegra_dfll_register(struct platform_device *pdev,
>> >>
>> >>          td->vdd_reg = devm_regulator_get(td->dev, "vdd-cpu");
>> >>          if (IS_ERR(td->vdd_reg)) {
>> >> -               dev_err(td->dev, "couldn't get vdd_cpu regulator\n");
>> >> -               return PTR_ERR(td->vdd_reg);
>> >> +               ret = PTR_ERR(td->vdd_reg);
>> >> +               dev_err(td->dev, "couldn't get vdd_cpu regulator: %d\n", ret);
>> >
>> > Do you want to know that a probe defer is happening? Usually patches are
>> > sent to make that error path silent.
>> >
>>
>> Just asking as the newbie here, but shouldn't probe deferral be
>> regulated to dev_debug?
>> Then pass any other error code as dev_err.
> 
> Yes probe defer should be relegated to debug level prints. Or really, we
> should introduce a more complicated system to make debugging probe defer
> errors simpler by informing us which driver is probe defering on what
> resource by putting debug prints in each framework that returns probe
> defer errors instead of updating each driver that uses these frameworks
> and thinks it needs to print errors in these cases. And hide all that
> behind some kernel commandline parameter and/or Kconfig option that lets
> us turn the prints off all the time if we're not developing drivers or
> testing things.

Afaict, that is already there in:
drivers/base/dd.c:really_probe()

So I suggest to just silence the EPROBE_DEFER case, e.g.\


	if (IS_ERR(td->vdd_reg)) {
		ret = PTR_ERR(td->vdd_reg);
		if (ret != -EPROBE_DEFER)
			dev_err(td->dev, "couldn't get vdd_cpu regulator: %d\n", ret);

		return ret;
	}

--
Stefan


> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] clk: tegra: probe deferral error reporting
  2018-07-26  7:55       ` Stefan Agner
@ 2018-07-26 16:42           ` Stephen Boyd
  0 siblings, 0 replies; 9+ messages in thread
From: Stephen Boyd @ 2018-07-26 16:42 UTC (permalink / raw)
  To: Stefan Agner
  Cc: Marcel Ziswiler, Peter Geis, linux-kernel, linux-tegra,
	Marcel Ziswiler, Thierry Reding, Prashant Gaikwad,
	Peter De Schrijver, Jonathan Hunter, Michael Turquette,
	linux-clk, linux-tegra-owner

Quoting Stefan Agner (2018-07-26 00:55:16)
> On 26.07.2018 09:31, Stephen Boyd wrote:
> > Quoting Peter Geis (2018-07-25 16:42:34)
> >> On 7/25/2018 7:24 PM, Stephen Boyd wrote:
> >> > Quoting Marcel Ziswiler (2018-07-20 00:54:22)
> >> >> 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/clk/tegra/clk-dfll.c | 5 +++--
> >> >>   1 file changed, 3 insertions(+), 2 deletions(-)
> >> >>
> >> >> diff --git a/drivers/clk/tegra/clk-dfll.c b/drivers/clk/tegra/clk-dfll.c
> >> >> index 48ee43734e05..b2123084e175 100644
> >> >> --- a/drivers/clk/tegra/clk-dfll.c
> >> >> +++ b/drivers/clk/tegra/clk-dfll.c
> >> >> @@ -1609,8 +1609,9 @@ int tegra_dfll_register(struct platform_device *pdev,
> >> >>
> >> >>          td->vdd_reg = devm_regulator_get(td->dev, "vdd-cpu");
> >> >>          if (IS_ERR(td->vdd_reg)) {
> >> >> -               dev_err(td->dev, "couldn't get vdd_cpu regulator\n");
> >> >> -               return PTR_ERR(td->vdd_reg);
> >> >> +               ret = PTR_ERR(td->vdd_reg);
> >> >> +               dev_err(td->dev, "couldn't get vdd_cpu regulator: %d\n", ret);
> >> >
> >> > Do you want to know that a probe defer is happening? Usually patches are
> >> > sent to make that error path silent.
> >> >
> >>
> >> Just asking as the newbie here, but shouldn't probe deferral be
> >> regulated to dev_debug?
> >> Then pass any other error code as dev_err.
> > 
> > Yes probe defer should be relegated to debug level prints. Or really, we
> > should introduce a more complicated system to make debugging probe defer
> > errors simpler by informing us which driver is probe defering on what
> > resource by putting debug prints in each framework that returns probe
> > defer errors instead of updating each driver that uses these frameworks
> > and thinks it needs to print errors in these cases. And hide all that
> > behind some kernel commandline parameter and/or Kconfig option that lets
> > us turn the prints off all the time if we're not developing drivers or
> > testing things.
> 
> Afaict, that is already there in:
> drivers/base/dd.c:really_probe()

All of it isn't really there when you consider devices may have many
different resources they're trying to get and then tracking down the one
driver that isn't probed and providing the resource fails. Then you get
to resort to hacking prints into the driver to see what particular
resource is probe defering.

> 
> So I suggest to just silence the EPROBE_DEFER case, e.g.\
> 
> 
>         if (IS_ERR(td->vdd_reg)) {
>                 ret = PTR_ERR(td->vdd_reg);
>                 if (ret != -EPROBE_DEFER)
>                         dev_err(td->dev, "couldn't get vdd_cpu regulator: %d\n", ret);
> 
>                 return ret;
>         }
> 

Sure this is fine.

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

* Re: [PATCH] clk: tegra: probe deferral error reporting
@ 2018-07-26 16:42           ` Stephen Boyd
  0 siblings, 0 replies; 9+ messages in thread
From: Stephen Boyd @ 2018-07-26 16:42 UTC (permalink / raw)
  To: Stefan Agner
  Cc: Marcel Ziswiler, Peter Geis, linux-kernel, linux-tegra,
	Marcel Ziswiler, Thierry Reding, Prashant Gaikwad,
	Peter De Schrijver, Jonathan Hunter, Michael Turquette,
	linux-clk, linux-tegra-owner

Quoting Stefan Agner (2018-07-26 00:55:16)
> On 26.07.2018 09:31, Stephen Boyd wrote:
> > Quoting Peter Geis (2018-07-25 16:42:34)
> >> On 7/25/2018 7:24 PM, Stephen Boyd wrote:
> >> > Quoting Marcel Ziswiler (2018-07-20 00:54:22)
> >> >> 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/clk/tegra/clk-dfll.c | 5 +++--
> >> >>   1 file changed, 3 insertions(+), 2 deletions(-)
> >> >>
> >> >> diff --git a/drivers/clk/tegra/clk-dfll.c b/drivers/clk/tegra/clk-d=
fll.c
> >> >> index 48ee43734e05..b2123084e175 100644
> >> >> --- a/drivers/clk/tegra/clk-dfll.c
> >> >> +++ b/drivers/clk/tegra/clk-dfll.c
> >> >> @@ -1609,8 +1609,9 @@ int tegra_dfll_register(struct platform_devic=
e *pdev,
> >> >>
> >> >>          td->vdd_reg =3D devm_regulator_get(td->dev, "vdd-cpu");
> >> >>          if (IS_ERR(td->vdd_reg)) {
> >> >> -               dev_err(td->dev, "couldn't get vdd_cpu regulator\n"=
);
> >> >> -               return PTR_ERR(td->vdd_reg);
> >> >> +               ret =3D PTR_ERR(td->vdd_reg);
> >> >> +               dev_err(td->dev, "couldn't get vdd_cpu regulator: %=
d\n", ret);
> >> >
> >> > Do you want to know that a probe defer is happening? Usually patches=
 are
> >> > sent to make that error path silent.
> >> >
> >>
> >> Just asking as the newbie here, but shouldn't probe deferral be
> >> regulated to dev_debug?
> >> Then pass any other error code as dev_err.
> > =

> > Yes probe defer should be relegated to debug level prints. Or really, we
> > should introduce a more complicated system to make debugging probe defer
> > errors simpler by informing us which driver is probe defering on what
> > resource by putting debug prints in each framework that returns probe
> > defer errors instead of updating each driver that uses these frameworks
> > and thinks it needs to print errors in these cases. And hide all that
> > behind some kernel commandline parameter and/or Kconfig option that lets
> > us turn the prints off all the time if we're not developing drivers or
> > testing things.
> =

> Afaict, that is already there in:
> drivers/base/dd.c:really_probe()

All of it isn't really there when you consider devices may have many
different resources they're trying to get and then tracking down the one
driver that isn't probed and providing the resource fails. Then you get
to resort to hacking prints into the driver to see what particular
resource is probe defering.

> =

> So I suggest to just silence the EPROBE_DEFER case, e.g.\
> =

> =

>         if (IS_ERR(td->vdd_reg)) {
>                 ret =3D PTR_ERR(td->vdd_reg);
>                 if (ret !=3D -EPROBE_DEFER)
>                         dev_err(td->dev, "couldn't get vdd_cpu regulator:=
 %d\n", ret);
> =

>                 return ret;
>         }
> =


Sure this is fine.

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

end of thread, other threads:[~2018-07-26 16:42 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-20  7:54 [PATCH] clk: tegra: probe deferral error reporting Marcel Ziswiler
2018-07-25 23:24 ` Stephen Boyd
2018-07-25 23:24   ` Stephen Boyd
2018-07-25 23:42   ` Peter Geis
2018-07-26  7:31     ` Stephen Boyd
2018-07-26  7:31       ` Stephen Boyd
2018-07-26  7:55       ` Stefan Agner
2018-07-26 16:42         ` Stephen Boyd
2018-07-26 16:42           ` Stephen Boyd

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.