From: Heiko Carstens Date: Wed, 1 Aug 2007 22:18:38 +0000 (+0200) Subject: Fix WARN_ON() on bitfield ops for all other archs X-Git-Tag: v2.6.23-rc2~27 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd0cbdd378258fdf44eac5ea091256a4a665315b;p=linux-2.6 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 Cc: Herbert Xu Cc: Haavard Skinnemoen Cc: Matthew Wilcox Cc: Kyle McMartin Cc: Martin Schwidefsky Acked-by: Paul Mundt Signed-off-by: Heiko Carstens Signed-off-by: Linus Torvalds --- diff --git a/include/asm-avr32/bug.h b/include/asm-avr32/bug.h index afdcd79a29..331d45bab1 100644 --- a/include/asm-avr32/bug.h +++ b/include/asm-avr32/bug.h @@ -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); \ diff --git a/include/asm-parisc/bug.h b/include/asm-parisc/bug.h index 83ba510ed5..8cfc553fc8 100644 --- a/include/asm-parisc/bug.h +++ b/include/asm-parisc/bug.h @@ -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(); \ diff --git a/include/asm-s390/bug.h b/include/asm-s390/bug.h index 838684dc6d..384e3621e3 100644 --- a/include/asm-s390/bug.h +++ b/include/asm-s390/bug.h @@ -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); \ diff --git a/include/asm-sh/bug.h b/include/asm-sh/bug.h index 46f925c815..a78d482e8b 100644 --- a/include/asm-sh/bug.h +++ b/include/asm-sh/bug.h @@ -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(); \