linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] regulator: core: Quiet -EPROBE_DEFER from regulator_bulk_get()
@ 2018-05-14 22:40 Douglas Anderson
  2018-05-17  4:32 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Douglas Anderson @ 2018-05-14 22:40 UTC (permalink / raw)
  To: broonie; +Cc: Douglas Anderson, Liam Girdwood, linux-kernel

The -EPROBE_DEFER virus demands special case code to avoid printing
error messages when the error is only -EPROBE_DEFER.  Spread the virus
to a new host: regulator_bulk_get()

Signed-off-by: Douglas Anderson <dianders@chromium.org>
---

 drivers/regulator/core.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index d4803460a557..42e97fb85e95 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -3696,8 +3696,9 @@ int regulator_bulk_get(struct device *dev, int num_consumers,
 						      consumers[i].supply);
 		if (IS_ERR(consumers[i].consumer)) {
 			ret = PTR_ERR(consumers[i].consumer);
-			dev_err(dev, "Failed to get supply '%s': %d\n",
-				consumers[i].supply, ret);
+			if (ret != -EPROBE_DEFER)
+				dev_err(dev, "Failed to get supply '%s': %d\n",
+					consumers[i].supply, ret);
 			consumers[i].consumer = NULL;
 			goto err;
 		}
-- 
2.17.0.441.gb46fe60e1d-goog

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

* Re: [PATCH] regulator: core: Quiet -EPROBE_DEFER from regulator_bulk_get()
  2018-05-14 22:40 [PATCH] regulator: core: Quiet -EPROBE_DEFER from regulator_bulk_get() Douglas Anderson
@ 2018-05-17  4:32 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2018-05-17  4:32 UTC (permalink / raw)
  To: Douglas Anderson; +Cc: Liam Girdwood, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 627 bytes --]

On Mon, May 14, 2018 at 03:40:27PM -0700, Douglas Anderson wrote:

> The -EPROBE_DEFER virus demands special case code to avoid printing
> error messages when the error is only -EPROBE_DEFER.  Spread the virus
> to a new host: regulator_bulk_get()

There's no requirement to suppress probe deferral messages and doing so
makes it harder to debug problems since things just fail silently.  It's
better to work on making the core smarter about probe ordering, for
example by building out the device dependency infrastructure so that it
can be used to avoid trying to probe things when we know there are
unsatisfied dependencies.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

end of thread, other threads:[~2018-05-17 16:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-14 22:40 [PATCH] regulator: core: Quiet -EPROBE_DEFER from regulator_bulk_get() Douglas Anderson
2018-05-17  4:32 ` Mark Brown

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