public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Jackson <pj@sgi.com>
To: Mikael Pettersson <mikpe@csd.uu.se>
Cc: akiyama.nobuyuk@jp.fujitsu.com, akpm@osdl.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] NMI trigger switch support for debugging
Date: Wed, 26 May 2004 13:34:38 -0700	[thread overview]
Message-ID: <20040526133438.196ca930.pj@sgi.com> (raw)
In-Reply-To: <16564.26285.431229.665902@alkaid.it.uu.se>

Mikael Pettersson, replying to AKIYAMA Nobuyuki:
>  > +	if (!old_state == !unknown_nmi_panic)
>  > +		return 0;
> 
> This conditional looks terribly obscure.

Would the following variant seem clearer:

	if (!!unknown_nmi_panic == !!old_state)
		return 0;

Odd, I know.  For those of us familiar with the '!!' idiom, which
converts any value to its binary logical equivalent 0 (if zero) or
1 (otherwise), this reads as:

	if (the logical value of unknown_nmi_panic is unchanged)
		return 0;

However, I could easily imagine others finding this variant even
more bizarre.

-- 
                          I won't rest till it's the best ...
                          Programmer, Linux Scalability
                          Paul Jackson <pj@sgi.com> 1.650.933.1373

  parent reply	other threads:[~2004-05-26 20:36 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-24  9:21 [PATCH] NMI trigger switch support for debugging AKIYAMA Nobuyuki
2004-05-24  9:34 ` Andrew Morton
2004-05-26  1:36   ` AKIYAMA Nobuyuki
2004-05-26  1:41     ` Andrew Morton
2004-05-26  2:28       ` AKIYAMA Nobuyuki
2004-05-26  2:37         ` Andrew Morton
2004-05-26 12:17           ` AKIYAMA Nobuyuki
2004-05-26 12:52           ` Maciej W. Rozycki
2004-05-27  8:43           ` AKIYAMA Nobuyuki
2004-05-26  9:43         ` Mikael Pettersson
2004-05-26 13:42           ` AKIYAMA Nobuyuki
2004-05-26 20:34           ` Paul Jackson [this message]
2004-05-26 21:04             ` Mikael Pettersson
2004-05-24 10:01 ` [PATCH] typo in drivers/usb/class/usblp.c Benoît Dejean
     [not found] <1ZjWz-sq-11@gated-at.bofh.it>
     [not found] ` <1Zk6a-z2-3@gated-at.bofh.it>
     [not found]   ` <1ZVyO-63D-25@gated-at.bofh.it>
     [not found]     ` <1ZVIq-69O-3@gated-at.bofh.it>
     [not found]       ` <1ZWuM-6Nz-1@gated-at.bofh.it>
     [not found]         ` <1ZWEt-6Uw-1@gated-at.bofh.it>
2004-05-26 11:23           ` [PATCH] NMI trigger switch support for debugging Andi Kleen

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=20040526133438.196ca930.pj@sgi.com \
    --to=pj@sgi.com \
    --cc=akiyama.nobuyuk@jp.fujitsu.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikpe@csd.uu.se \
    /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