clk: tegra: probe deferral error reporting
Subsystems (3)
PATCH 1/1 clk: tegra: probe deferral error reporting
From: Marcel Ziswiler <[email protected]>
Actually report the error code from devm_regulator_get() which may as well just be a probe deferral.
---
drivers/clk/tegra/clk-dfll.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/clk/tegra/clk-dfll.c +3 -2
@@ -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" );
Signature · 1 line
2.14.4
Stephen Boyd
maintainerQuoting Marcel Ziswiler (2018-07-20 00:54:22)
drivers/clk/tegra/clk-dfll.c int tegra_dfll_register(struct platform_device *pde=
Quoted 22 lines
From: Marcel Ziswiler <[email protected]> =
Actually report the error code from
devm_regulator_get()which may as well just be a probe deferral.
=Signed-off-by Marcel Ziswiler <[email protected]>=
---
=drivers/clk/tegra/clk-dfll.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)=
drivers/clk/tegra/clk-dfll.c +0
-0@@ -1609,8 +1609,9 @@ int tegra_dfll_register(struct platform_device *pde=
v,
drivers/clk/tegra/clk-dfll.c int tegra_dfll_register(struct platform_device *pdev,
Quoted 8 lines
drivers/clk/tegra/clk-dfll.c +2
-2= 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.
Quoted 19 lines · Stephen Boyd
Quoting Marcel Ziswiler (2018-07-20 00:54:22)
Quoted 18 lines
From: Marcel Ziswiler <[email protected]>
Actually report the error code from
devm_regulator_get()which may as well just be a probe deferral.Signed-off-by Marcel Ziswiler <[email protected]>---
drivers/clk/tegra/clk-dfll.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)drivers/clk/tegra/clk-dfll.c +0
-0@@ -1609,8 +1609,9 @@ int tegra_dfll_register(struct platform_device *pdev,
Quoted 10 lines
drivers/clk/tegra/clk-dfll.c int tegra_dfll_register(struct platform_device *pdev, · line 1613
Quoted 6 lines
drivers/clk/tegra/clk-dfll.c +2
-2td->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.
Stephen Boyd
maintainerQuoting Peter Geis (2018-07-25 16:42:34)
Quoted 7 lines · Stephen Boyd
Quoted 6 lines
Quoting Marcel Ziswiler (2018-07-20 00:54:22)
Quoted 5 lines
From: Marcel Ziswiler <[email protected]>
Actually report the error code from
devm_regulator_get()which may as well just be a probe deferral.
Quoted 8 lines
Quoted 8 lines
drivers/clk/tegra/clk-dfll=
Quoted 8 lines
Signed-off-by Marcel Ziswiler <[email protected]>---
drivers/clk/tegra/clk-dfll.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)drivers/clk/tegra/clk-dfll= renamed from drivers/clk/tegra/clk-dfll.c +0
-0
.c
Quoted 4 lines
Quoted 4 lines
drivers/clk/tegra/clk-dfll.c int tegra_dfll_register(struct platform_device *=
Quoted 4 lines
index
48ee43734e05..b2123084e175100644drivers/clk/tegra/clk-dfll.c +0
-0@@ -1609,8 +1609,9 @@ int tegra_dfll_register(struct platform_device *=
pdev,
Quoted 8 lines
Quoted 8 lines
drivers/clk/tegra/clk-dfll.c int tegra_dfll_register(struct platform_device *pdev,
Quoted 8 lines
drivers/clk/tegra/clk-dfll.c +2
-2= 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);
Quoted 6 lines
Quoted 5 lines
=
Do you want to know that a probe defer is happening? Usually patches are sent to make that error path silent.
=
Quoted 6 lines
=
Just asking as the newbie here, but shouldn't probe deferral be =
regulated to
dev_debug?
Then pass any other error code asdev_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.
Quoted 36 lines · Stephen Boyd
Quoting Peter Geis (2018-07-25 16:42:34)
Quoted 31 lines · Stephen Boyd
Quoted 19 lines
Quoting Marcel Ziswiler (2018-07-20 00:54:22)
Quoted 18 lines
From: Marcel Ziswiler <[email protected]>
Actually report the error code from
devm_regulator_get()which may as well just be a probe deferral.Signed-off-by Marcel Ziswiler <[email protected]>---
drivers/clk/tegra/clk-dfll.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)drivers/clk/tegra/clk-dfll.c +0
-0@@ -1609,8 +1609,9 @@ int tegra_dfll_register(struct platform_device *pdev,Quoted 10 lines
drivers/clk/tegra/clk-dfll.c int tegra_dfll_register(struct platform_device *pdev, · line 1613
Quoted 6 lines
drivers/clk/tegra/clk-dfll.c +2
-2td->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.
Quoted 3 lines
Just asking as the newbie here, but shouldn't probe deferral be regulated to
dev_debug?
Then pass any other error code asdev_err.
Quoted 9 lines
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
Kconfigoption 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
Quoted 5 lines
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Stephen Boyd
maintainerQuoting Stefan Agner (2018-07-26 00:55:16)
Quoted 7 lines · Stephen Boyd
Quoted 6 lines
Quoting Peter Geis (2018-07-25 16:42:34)
Quoted 5 lines · Stephen Boyd
Quoted 4 lines
Quoting Marcel Ziswiler (2018-07-20 00:54:22)
Quoted 3 lines
From: Marcel Ziswiler <[email protected]>
Actually report the error code from
devm_regulator_get()which may =
as
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
drivers/clk/tegra/clk-d=
Quoted 10 lines
well just be a probe deferral.
Signed-off-by Marcel Ziswiler <[email protected]>---
drivers/clk/tegra/clk-dfll.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)drivers/clk/tegra/clk-d= renamed from drivers/clk/tegra/clk-dfll.c +0
-0
fll.c
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
drivers/clk/tegra/clk-dfll.c int tegra_dfll_register(struct platform_devic=
Quoted 4 lines
index
48ee43734e05..b2123084e175100644drivers/clk/tegra/clk-dfll.c +0
-0@@ -1609,8 +1609,9 @@ int tegra_dfll_register(struct platform_devic=
e *pdev,
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
drivers/clk/tegra/clk-dfll.c int tegra_dfll_register(struct platform_devic= · line 1611
Quoted 4 lines
drivers/clk/tegra/clk-dfll.c +0
-1td->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"=
);
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
drivers/clk/tegra/clk-dfll.c int tegra_dfll_register(struct platform_devic= · line 1612
Quoted 3 lines
drivers/clk/tegra/clk-dfll.c +2
-1-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);
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Do you want to know that a probe defer is happening? Usually patches=
are
Quoted 17 lines
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
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 asdev_err.=
Quoted 9 lines
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
Kconfigoption that lets us turn the prints off all the time if we're not developing drivers or testing things.
Quoted 4 lines
=
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.
Quoted 11 lines
=
So I suggest to just silence the
EPROBE_DEFERcase, 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);
Quoted 5 lines
=
return ret; }=
Sure this is fine.