lkml.org 
[lkml]   [2007]   [Aug]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: WARN_ON() which sometimes sucks
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. :)

But your criticism is correct with regard to the powerpc BUG_ON, and
you're correct that a long wouldn't be sufficient if someone passes in
a long long. Oh well. I guess we just wear the extra two
instructions.

Paul.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-08-01 06:23    [W:0.029 / U:28.244 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site