All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
Cc: Wei Ni <wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org,
	swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org,
	lm-sensors-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.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-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>

[-- 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 --]

WARNING: multiple messages have this Message-ID (diff)
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 --]

WARNING: multiple messages have this Message-ID (diff)
From: Thierry Reding <thierry.reding@gmail.com>
To: Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
Cc: Wei Ni <wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org,
	swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org,
	lm-sensors-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [lm-sensors] [PATCH v2 2/3] hwmon: (lm90) add support to handle IRQ.
Date: Wed, 10 Jul 2013 18:49:03 +0000	[thread overview]
Message-ID: <20130710184902.GD15665@dhcp-172-17-186-34.nvidia.com> (raw)
In-Reply-To: <20130710181248.GA22430-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>


[-- Attachment #1.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 #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

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

Thread overview: 38+ 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 ` [lm-sensors] " Wei Ni
2013-07-10 11:25 ` 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 11:25   ` [lm-sensors] " Wei Ni
2013-07-10 11:25   ` Wei Ni
     [not found]   ` <1373455539-2831-2-git-send-email-wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-07-10 18:21     ` Guenter Roeck
2013-07-10 18:21       ` [lm-sensors] " Guenter Roeck
2013-07-10 18:21       ` Guenter Roeck
     [not found]       ` <20130710182154.GC22430-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2013-07-11  8:42         ` Wei Ni
2013-07-11  8:42           ` [lm-sensors] " Wei Ni
2013-07-11  8:42           ` Wei Ni
     [not found] ` <1373455539-2831-1-git-send-email-wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-07-10 11:25   ` [PATCH v2 2/3] hwmon: (lm90) add support to handle IRQ Wei Ni
2013-07-10 11:25     ` [lm-sensors] " Wei Ni
2013-07-10 11:25     ` Wei Ni
     [not found]     ` <1373455539-2831-3-git-send-email-wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-07-10 17:05       ` Thierry Reding
2013-07-10 17:05         ` [lm-sensors] " Thierry Reding
2013-07-10 17:05         ` Thierry Reding
     [not found]         ` <20130710170552.GA15665-RcKxWJ4Cfj3FNiLNb7+IINdj8bHVeoWogfoxzgwHRXE@public.gmane.org>
2013-07-10 18:12           ` Guenter Roeck
2013-07-10 18:12             ` [lm-sensors] " Guenter Roeck
2013-07-10 18:12             ` Guenter Roeck
     [not found]             ` <20130710181248.GA22430-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2013-07-10 18:49               ` Thierry Reding [this message]
2013-07-10 18:49                 ` [lm-sensors] " Thierry Reding
2013-07-10 18:49                 ` Thierry Reding
2013-07-11  8:36               ` Wei Ni
2013-07-11  8:36                 ` [lm-sensors] " Wei Ni
2013-07-11  8:36                 ` Wei Ni
2013-07-10 18:18       ` Guenter Roeck
2013-07-10 18:18         ` [lm-sensors] " Guenter Roeck
2013-07-10 18:18         ` Guenter Roeck
     [not found]         ` <20130710181820.GB22430-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2013-07-11  8:40           ` Wei Ni
2013-07-11  8:40             ` [lm-sensors] " Wei Ni
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 11:25   ` [lm-sensors] " Wei Ni
2013-07-10 11:25   ` Wei Ni
2013-07-10 18:25   ` Guenter Roeck
2013-07-10 18:25     ` [lm-sensors] " 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-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org \
    --cc=linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=lm-sensors-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org \
    --cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org \
    --cc=wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    /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.