diff options
-rw-r--r-- | include/asm-generic/bug.h | 6 | ||||
-rw-r--r-- | include/asm-powerpc/bug.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h index 344e3091af24..d56fedbb457a 100644 --- a/include/asm-generic/bug.h +++ b/include/asm-generic/bug.h | |||
@@ -33,7 +33,7 @@ struct bug_entry { | |||
33 | 33 | ||
34 | #ifndef HAVE_ARCH_WARN_ON | 34 | #ifndef HAVE_ARCH_WARN_ON |
35 | #define WARN_ON(condition) ({ \ | 35 | #define WARN_ON(condition) ({ \ |
36 | typeof(condition) __ret_warn_on = (condition); \ | 36 | int __ret_warn_on = !!(condition); \ |
37 | if (unlikely(__ret_warn_on)) { \ | 37 | if (unlikely(__ret_warn_on)) { \ |
38 | printk("WARNING: at %s:%d %s()\n", __FILE__, \ | 38 | printk("WARNING: at %s:%d %s()\n", __FILE__, \ |
39 | __LINE__, __FUNCTION__); \ | 39 | __LINE__, __FUNCTION__); \ |
@@ -54,7 +54,7 @@ struct bug_entry { | |||
54 | 54 | ||
55 | #ifndef HAVE_ARCH_WARN_ON | 55 | #ifndef HAVE_ARCH_WARN_ON |
56 | #define WARN_ON(condition) ({ \ | 56 | #define WARN_ON(condition) ({ \ |
57 | typeof(condition) __ret_warn_on = (condition); \ | 57 | int __ret_warn_on = !!(condition); \ |
58 | unlikely(__ret_warn_on); \ | 58 | unlikely(__ret_warn_on); \ |
59 | }) | 59 | }) |
60 | #endif | 60 | #endif |
@@ -62,7 +62,7 @@ struct bug_entry { | |||
62 | 62 | ||
63 | #define WARN_ON_ONCE(condition) ({ \ | 63 | #define WARN_ON_ONCE(condition) ({ \ |
64 | static int __warned; \ | 64 | static int __warned; \ |
65 | typeof(condition) __ret_warn_once = (condition); \ | 65 | int __ret_warn_once = !!(condition); \ |
66 | \ | 66 | \ |
67 | if (unlikely(__ret_warn_once)) \ | 67 | if (unlikely(__ret_warn_once)) \ |
68 | if (WARN_ON(!__warned)) \ | 68 | if (WARN_ON(!__warned)) \ |
diff --git a/include/asm-powerpc/bug.h b/include/asm-powerpc/bug.h index a248b8bd4d7c..e55d1f66b86f 100644 --- a/include/asm-powerpc/bug.h +++ b/include/asm-powerpc/bug.h | |||
@@ -93,7 +93,7 @@ | |||
93 | } while (0) | 93 | } while (0) |
94 | 94 | ||
95 | #define WARN_ON(x) ({ \ | 95 | #define WARN_ON(x) ({ \ |
96 | typeof(x) __ret_warn_on = (x); \ | 96 | int __ret_warn_on = !!(x); \ |
97 | if (__builtin_constant_p(__ret_warn_on)) { \ | 97 | if (__builtin_constant_p(__ret_warn_on)) { \ |
98 | if (__ret_warn_on) \ | 98 | if (__ret_warn_on) \ |
99 | __WARN(); \ | 99 | __WARN(); \ |