From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: akpm@linux-foundation.org
Cc: linuxppc-dev@ozlabs.org, roel.kluin@gmail.com
Subject: Re: [patch 1/2] macintosh: wrong test in fan_{read,write}_reg()
Date: Wed, 19 Jan 2011 08:22:07 +1100 [thread overview]
Message-ID: <1295385727.2148.85.camel@pasglop> (raw)
In-Reply-To: <201101182109.p0IL992W005451@imap1.linux-foundation.org>
On Tue, 2011-01-18 at 13:09 -0800, akpm@linux-foundation.org wrote:
> From: roel kluin <roel.kluin@gmail.com>
>
> Fix error test in fan_{read,write}_reg()
Thanks, I'll pick that up.
Cheers,
Ben.
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
>
> drivers/macintosh/therm_pm72.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff -puN drivers/macintosh/therm_pm72.c~macintosh-wrong-test-in-fan_readwrite_reg drivers/macintosh/therm_pm72.c
> --- a/drivers/macintosh/therm_pm72.c~macintosh-wrong-test-in-fan_readwrite_reg
> +++ a/drivers/macintosh/therm_pm72.c
> @@ -443,7 +443,7 @@ static int fan_read_reg(int reg, unsigne
> tries = 0;
> for (;;) {
> nr = i2c_master_recv(fcu, buf, nb);
> - if (nr > 0 || (nr < 0 && nr != ENODEV) || tries >= 100)
> + if (nr > 0 || (nr < 0 && nr != -ENODEV) || tries >= 100)
> break;
> msleep(10);
> ++tries;
> @@ -464,7 +464,7 @@ static int fan_write_reg(int reg, const
> tries = 0;
> for (;;) {
> nw = i2c_master_send(fcu, buf, nb);
> - if (nw > 0 || (nw < 0 && nw != EIO) || tries >= 100)
> + if (nw > 0 || (nw < 0 && nw != -EIO) || tries >= 100)
> break;
> msleep(10);
> ++tries;
> _
prev parent reply other threads:[~2011-01-18 21:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-18 21:09 [patch 1/2] macintosh: wrong test in fan_{read,write}_reg() akpm
2011-01-18 21:22 ` Benjamin Herrenschmidt [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=1295385727.2148.85.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=akpm@linux-foundation.org \
--cc=linuxppc-dev@ozlabs.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 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.