Fix WARN_ON() on bitfield ops for all other archs
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Wed, 1 Aug 2007 22:18:38 +0000 (00:18 +0200)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Thu, 2 Aug 2007 03:45:38 +0000 (20:45 -0700)
Fixes WARN_ON() on bitfiels ops for all architectures that have
been left out in 8d4fbcfbe0a4bfc73e7f0297c59ae514e1f1436f.

Cc: Alexey Dobriyan <adobriyan@sw.ru>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: Matthew Wilcox <matthew@wil.cx>
Cc: Kyle McMartin <kyle@parisc-linux.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/asm-avr32/bug.h
include/asm-parisc/bug.h
include/asm-s390/bug.h
include/asm-sh/bug.h

index afdcd79a2966daa220a05b44f181cdf4138fed1a..331d45bab18f3b13e4eaf4faa4aaf6433883f924 100644 (file)
@@ -57,7 +57,7 @@
 
 #define WARN_ON(condition)                                                     \
        ({                                                              \
-               typeof(condition) __ret_warn_on = (condition);          \
+               int __ret_warn_on = !!(condition);                      \
                if (unlikely(__ret_warn_on))                            \
                        _BUG_OR_WARN(BUGFLAG_WARNING);                  \
                unlikely(__ret_warn_on);                                \
index 83ba510ed5d874ea77c70ec9d8ed7352fd31b6dc..8cfc553fc837267e2342cbf66f4ef27efacde143 100644 (file)
@@ -74,7 +74,7 @@
 
 
 #define WARN_ON(x) ({                                          \
-       typeof(x) __ret_warn_on = (x);                          \
+       int __ret_warn_on = !!(x);                              \
        if (__builtin_constant_p(__ret_warn_on)) {              \
                if (__ret_warn_on)                              \
                        __WARN();                               \
index 838684dc6d35c50a04ccd05afafad9d0a5cd7001..384e3621e3418055feb30164c207f058cf746c58 100644 (file)
@@ -50,7 +50,7 @@
 #define BUG()  __EMIT_BUG(0)
 
 #define WARN_ON(x) ({                                  \
-       typeof(x) __ret_warn_on = (x);                  \
+       int __ret_warn_on = !!(x);                      \
        if (__builtin_constant_p(__ret_warn_on)) {      \
                if (__ret_warn_on)                      \
                        __EMIT_BUG(BUGFLAG_WARNING);    \
index 46f925c815aca9918823e4b23607b1e50e833cd4..a78d482e8b2f378969fc86b907f8a1625b83b1bd 100644 (file)
@@ -61,7 +61,7 @@ do {                                                  \
 } while (0)
 
 #define WARN_ON(x) ({                                          \
-       typeof(x) __ret_warn_on = (x);                          \
+       int __ret_warn_on = !!(x);                              \
        if (__builtin_constant_p(__ret_warn_on)) {              \
                if (__ret_warn_on)                              \
                        __WARN();                               \