mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] regulator: core: Silence EPROBE_DEFER error on bulk_get
Date: Thu, 5 Mar 2015 00:06:16 +0000	[thread overview]
Message-ID: <20150305000616.GY21293@sirena.org.uk> (raw)
In-Reply-To: <1424994020-6698-1-git-send-email-bjorn.andersson@sonymobile.com>

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

On Thu, Feb 26, 2015 at 03:40:20PM -0800, Bjorn Andersson wrote:

> As this is already being logged elsewhere we shouldn't spam the log
> unnecessarily upon EPROBE_DEFER.

Where exactly is this "elsewhere" you're thinking of?  I suspect you
mean the core -EPROBE_DEFER logging but you don't say...

> Maybe we should have a dev_dbg() for EPROBE_DEFER to aid finding which
> regulator it actually was that it deferred?

No, that's the wrong way around:

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

What you're saying here is that essentially everything in the probe path
has to special case -EPROBE_DEFER to remove error logging which in turn
means that any useful information gets elided from the logs.  Having a
debug level log that people can enable or dig out helps somewhat but
it's not really helping users to make it harder to discover information.

If you think probe deferral is too noisy then fix it, don't go and add
lots of special casing code to the error handling.  If other things
aren't reporting errors well then fix that.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

      reply	other threads:[~2015-03-05  0:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-26 23:40 Bjorn Andersson
2015-03-05  0:06 ` Mark Brown [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150305000616.GY21293@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=bjorn.andersson@sonymobile.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®