[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130710184902.GD15665@dhcp-172-17-186-34.nvidia.com>
Date: Wed, 10 Jul 2013 11:49:03 -0700
From: Thierry Reding <thierry.reding@...il.com>
To: Guenter Roeck <linux@...ck-us.net>
Cc: Wei Ni <wni@...dia.com>, khali@...ux-fr.org, swarren@...dotorg.org,
lm-sensors@...sensors.org, linux-kernel@...r.kernel.org,
linux-tegra@...r.kernel.org
Subject: Re: [PATCH v2 2/3] hwmon: (lm90) add support to handle IRQ.
On Wed, Jul 10, 2013 at 11:12:49AM -0700, Guenter Roeck wrote:
> On Wed, Jul 10, 2013 at 10:05:53AM -0700, Thierry Reding wrote:
> > On Wed, Jul 10, 2013 at 07:25:38PM +0800, Wei Ni wrote:
[...]
> > > + if ((alarms & 0x7f) == 0 && (alarms_max6696 & 0xfe) == 0) {
> > > + return IRQ_NONE;
> >
> > For non-MAX6696 chips this will evaluate to:
> >
> > if ((alarms & 0x7f) == 0 && (0 & 0xfe) == 0)
> >
> > and therefore be true for any value of "alarms" and therefore always
> > result in IRQ_NONE being returned.
> >
> Not really. If
> (alarms & 0xfe) == 0
> returns false (ie thee is an alarm) the expression is false and the
> if statement won't be executed. Or maybe I didn't get enough sleep
> last night ;).
You're right. Looks like I am the one that didn't get enough sleep last
night. =) So the original code indeed seems to be doing what it should.
Thierry
Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists