The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Joe Korty <joe.korty@ccur.com>
To: Paul Mackerras <paulus@samba.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Al Viro <viro@ftp.linux.org.uk>,
	Alexey Dobriyan <adobriyan@sw.ru>,
	akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
	herbert@gondor.apana.org.au
Subject: Re: WARN_ON() which sometimes sucks
Date: Wed, 1 Aug 2007 11:17:15 -0400	[thread overview]
Message-ID: <20070801151715.GA22431@tsunami.ccur.com> (raw)
In-Reply-To: <18096.2592.877510.221163@cargo.ozlabs.ibm.com>

On Wed, Aug 01, 2007 at 02:20:48PM +1000, Paul Mackerras wrote:
> Linus Torvalds writes:
> 
> > Umm. The WARN_ON() might actually get a "long long" value for all we know. 
> > Ie it's perfectly possible that the WARN_ON might look like
> > 
> > 	/* Must not have high bits on */
> > 	WARN_ON(offset & 0xffffffff00000000);
> > 
> > which on a 32-bit pcc would apparently do the wrong thing entirely as it 
> > stands now. No?
> 
> Actually, because of the typeof in the powerpc WARN_ON, I think it
> would fail to build since we'd be passing a long long value to an
> inline asm, or at least I hope it would fail to build. :)


Turning the condition into an integer should work ...

	#define NEW_WARN_ON(x) OLD_WARN_ON(!!(x))

Regards,
Joe


      reply	other threads:[~2007-08-01 15:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-31 15:55 WARN_ON() which sometimes sucks Alexey Dobriyan
2007-07-31 16:02 ` Al Viro
2007-08-01  3:53   ` Paul Mackerras
2007-08-01  4:05     ` Linus Torvalds
2007-08-01  4:20       ` Paul Mackerras
2007-08-01 15:17         ` Joe Korty [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=20070801151715.GA22431@tsunami.ccur.com \
    --to=joe.korty@ccur.com \
    --cc=adobriyan@sw.ru \
    --cc=akpm@linux-foundation.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulus@samba.org \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@ftp.linux.org.uk \
    /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