All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Axel Lin <axel.lin@gmail.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	Liam Girdwood <lrg@slimlogic.co.uk>
Subject: Re: [PATCH] Regulator: lp3972 cleanup
Date: Fri, 17 Sep 2010 13:28:44 +0100	[thread overview]
Message-ID: <20100917122844.GD4322@rakim.wolfsonmicro.main> (raw)
In-Reply-To: <1284702257.9481.3.camel@mola>

On Fri, Sep 17, 2010 at 01:44:17PM +0800, Axel Lin wrote:

>  - Logging the value for diagnostics if failed to detect device

>  	if (ret == 0 && (val & SYS_CONTROL1_INIT_MASK) != SYS_CONTROL1_INIT_VAL)
>  		ret = -ENODEV;
>  	if (ret < 0) {
> -		dev_err(&i2c->dev, "failed to detect device\n");
> +		dev_err(&i2c->dev, "failed to detect device: %d\n", ret);

This misses part of the point of my suggestion - if you don't match the
ID register then you'll log -ENODEV rather than the device ID that you
read back which would presumably be more useful for someone trying to
work out why the check triggered.

Lots of other good stuff in there, though:

Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

  reply	other threads:[~2010-09-17 12:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-17  5:44 [PATCH] Regulator: lp3972 cleanup Axel Lin
2010-09-17 12:28 ` Mark Brown [this message]
2010-09-20  8:46   ` Liam Girdwood

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=20100917122844.GD4322@rakim.wolfsonmicro.main \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=axel.lin@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lrg@slimlogic.co.uk \
    /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 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.