From: Samuel Ortiz <sameo@openedhand.com>
To: Roel Kluin <roel.kluin@gmail.com>
Cc: broonie@opensource.wolfsonmicro.com, lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mfd: tries reaches -1
Date: Fri, 6 Feb 2009 14:58:22 +0100 [thread overview]
Message-ID: <20090206135821.GD3341@sortiz.org> (raw)
In-Reply-To: <4981CB45.8010108@gmail.com>
On Thu, Jan 29, 2009 at 04:29:09PM +0100, Roel Kluin wrote:
> With a postfix decrement tries will reach -1 rather than 0,
> so the warning will not be issued even upon timeout.
Thanks Roel, applied.
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
> ---
> diff --git a/drivers/mfd/wm8350-core.c b/drivers/mfd/wm8350-core.c
> index f92595c..2e0e5c2 100644
> --- a/drivers/mfd/wm8350-core.c
> +++ b/drivers/mfd/wm8350-core.c
> @@ -1111,7 +1111,7 @@ int wm8350_read_auxadc(struct wm8350 *wm8350, int channel, int scale, int vref)
> do {
> schedule_timeout_interruptible(1);
> reg = wm8350_reg_read(wm8350, WM8350_DIGITISER_CONTROL_1);
> - } while (tries-- && (reg & WM8350_AUXADC_POLL));
> + } while (--tries && (reg & WM8350_AUXADC_POLL));
>
> if (!tries)
> dev_err(wm8350->dev, "adc chn %d read timeout\n", channel);
>
--
Intel Open Source Technology Centre
http://oss.intel.com/
prev parent reply other threads:[~2009-02-06 13:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-29 15:29 [PATCH] mfd: tries reaches -1 Roel Kluin
2009-01-29 18:29 ` Mark Brown
2009-02-06 13:58 ` Samuel Ortiz [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=20090206135821.GD3341@sortiz.org \
--to=sameo@openedhand.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=linux-kernel@vger.kernel.org \
--cc=roel.kluin@gmail.com \
/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