Commit fd0cbdd378258fdf44eac5ea091256a4a665315b

Authored by Heiko Carstens
Committed by Linus Torvalds
1 parent 8d4fbcfbe0

Fix WARN_ON() on bitfield ops for all other archs

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>

Showing 4 changed files with 4 additions and 4 deletions Side-by-side Diff

include/asm-avr32/bug.h
... ... @@ -57,7 +57,7 @@
57 57  
58 58 #define WARN_ON(condition) \
59 59 ({ \
60   - typeof(condition) __ret_warn_on = (condition); \
  60 + int __ret_warn_on = !!(condition); \
61 61 if (unlikely(__ret_warn_on)) \
62 62 _BUG_OR_WARN(BUGFLAG_WARNING); \
63 63 unlikely(__ret_warn_on); \
include/asm-parisc/bug.h
... ... @@ -74,7 +74,7 @@
74 74  
75 75  
76 76 #define WARN_ON(x) ({ \
77   - typeof(x) __ret_warn_on = (x); \
  77 + int __ret_warn_on = !!(x); \
78 78 if (__builtin_constant_p(__ret_warn_on)) { \
79 79 if (__ret_warn_on) \
80 80 __WARN(); \
include/asm-s390/bug.h
... ... @@ -50,7 +50,7 @@
50 50 #define BUG() __EMIT_BUG(0)
51 51  
52 52 #define WARN_ON(x) ({ \
53   - typeof(x) __ret_warn_on = (x); \
  53 + int __ret_warn_on = !!(x); \
54 54 if (__builtin_constant_p(__ret_warn_on)) { \
55 55 if (__ret_warn_on) \
56 56 __EMIT_BUG(BUGFLAG_WARNING); \
include/asm-sh/bug.h
... ... @@ -61,7 +61,7 @@
61 61 } while (0)
62 62  
63 63 #define WARN_ON(x) ({ \
64   - typeof(x) __ret_warn_on = (x); \
  64 + int __ret_warn_on = !!(x); \
65 65 if (__builtin_constant_p(__ret_warn_on)) { \
66 66 if (__ret_warn_on) \
67 67 __WARN(); \