mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Wei Ni <wni@nvidia.com>,
	khali@linux-fr.org, swarren@wwwdotorg.org,
	lm-sensors@lm-sensors.org, linux-kernel@vger.kernel.org,
	linux-tegra@vger.kernel.org
Subject: Re: [PATCH v2 2/3] hwmon: (lm90) add support to handle IRQ.
Date: Wed, 10 Jul 2013 11:49:03 -0700	[thread overview]
Message-ID: <20130710184902.GD15665@dhcp-172-17-186-34.nvidia.com> (raw)
In-Reply-To: <20130710181248.GA22430@roeck-us.net>

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

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

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

  reply	other threads:[~2013-07-10 18:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-10 11:25 [PATCH v2 0/3] Lm90 Enhancements Wei Ni
2013-07-10 11:25 ` [PATCH v2 1/3] hwmon: (lm90) split set&show temp as common codes Wei Ni
2013-07-10 18:21   ` Guenter Roeck
2013-07-11  8:42     ` Wei Ni
2013-07-10 11:25 ` [PATCH v2 2/3] hwmon: (lm90) add support to handle IRQ Wei Ni
2013-07-10 17:05   ` Thierry Reding
2013-07-10 18:12     ` Guenter Roeck
2013-07-10 18:49       ` Thierry Reding [this message]
2013-07-11  8:36       ` Wei Ni
2013-07-10 18:18   ` Guenter Roeck
2013-07-11  8:40     ` Wei Ni
2013-07-10 11:25 ` [PATCH v2 3/3] hwmon: (lm90) use enums for the indexes of temp8 and temp11 Wei Ni
2013-07-10 18:25   ` Guenter Roeck

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=20130710184902.GD15665@dhcp-172-17-186-34.nvidia.com \
    --to=thierry.reding@gmail.com \
    --cc=khali@linux-fr.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=lm-sensors@lm-sensors.org \
    --cc=swarren@wwwdotorg.org \
    --cc=wni@nvidia.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

all inboxes | Powered by JetHome®