Message ID | 20200427074832.22134-5-m.szyprowski@samsung.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Minor WM8994 MFD/codec fixes | expand |
On Mon, Apr 27, 2020 at 09:48:32AM +0200, Marek Szyprowski wrote: > Don't confuse user with meaningless warning about the failure in getting > clocks in case of deferred probe. > > Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> > --- Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Thanks, Charles
On Mon, Apr 27, 2020 at 09:48:32AM +0200, Marek Szyprowski wrote: > Don't confuse user with meaningless warning about the failure in getting > clocks in case of deferred probe. > if (ret < 0) { > - dev_err(&pdev->dev, "Failed to get clocks: %d\n", ret); > + if (ret != -EPROBE_DEFER) > + dev_err(&pdev->dev, "Failed to get clocks: %d\n", ret); This completely eliminates the diagnostics which means that if the clock isn't there the user is a bit stuck trying to work out what's missing. There should still be a diagnostic.
On Mon, 27 Apr 2020, Mark Brown wrote: > On Mon, Apr 27, 2020 at 09:48:32AM +0200, Marek Szyprowski wrote: > > Don't confuse user with meaningless warning about the failure in getting > > clocks in case of deferred probe. > > > if (ret < 0) { > > - dev_err(&pdev->dev, "Failed to get clocks: %d\n", ret); > > + if (ret != -EPROBE_DEFER) > > + dev_err(&pdev->dev, "Failed to get clocks: %d\n", ret); > > This completely eliminates the diagnostics which means that if the clock > isn't there the user is a bit stuck trying to work out what's missing. > There should still be a diagnostic. The driver won't defer forever though. The final pass should fail with a different error. At which point the error will be released to the system log, no?
On Tue, Apr 28, 2020 at 11:36:38AM +0100, Lee Jones wrote: > On Mon, 27 Apr 2020, Mark Brown wrote: > > This completely eliminates the diagnostics which means that if the clock > > isn't there the user is a bit stuck trying to work out what's missing. > > There should still be a diagnostic. > The driver won't defer forever though. The final pass should fail > with a different error. At which point the error will be released to > the system log, no? One of the really common cases is that someone forgot to build the driver for the dependency so it'll just defer forever waiting for something that never loads.
On Tue, 28 Apr 2020, Mark Brown wrote: > On Tue, Apr 28, 2020 at 11:36:38AM +0100, Lee Jones wrote: > > On Mon, 27 Apr 2020, Mark Brown wrote: > > > > This completely eliminates the diagnostics which means that if the clock > > > isn't there the user is a bit stuck trying to work out what's missing. > > > There should still be a diagnostic. > > > The driver won't defer forever though. The final pass should fail > > with a different error. At which point the error will be released to > > the system log, no? > > One of the really common cases is that someone forgot to build the > driver for the dependency so it'll just defer forever waiting for > something that never loads. Need to find another way to identify these failures. There are 10's if not 100's of cases of silently returning if -EPROBE_DEFER is caught.
On Wed, Apr 29, 2020 at 08:15:53AM +0100, Lee Jones wrote: > On Tue, 28 Apr 2020, Mark Brown wrote: > > One of the really common cases is that someone forgot to build the > > driver for the dependency so it'll just defer forever waiting for > > something that never loads. > Need to find another way to identify these failures. There are 10's > if not 100's of cases of silently returning if -EPROBE_DEFER is > caught. Or someone could go through and improve the diagnostics on those cases.
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index 55d0b9be6ff0..7426df1f806c 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c @@ -4593,7 +4593,8 @@ static int wm8994_probe(struct platform_device *pdev) ret = devm_clk_bulk_get_optional(pdev->dev.parent, ARRAY_SIZE(wm8994->mclk), wm8994->mclk); if (ret < 0) { - dev_err(&pdev->dev, "Failed to get clocks: %d\n", ret); + if (ret != -EPROBE_DEFER) + dev_err(&pdev->dev, "Failed to get clocks: %d\n", ret); return ret; }
Don't confuse user with meaningless warning about the failure in getting clocks in case of deferred probe. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> --- sound/soc/codecs/wm8994.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)