提交 fd0cbdd3 编写于 作者: H Heiko Carstens 提交者: Linus Torvalds

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 8d4fbcfb.

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: NPaul Mundt <lethal@linux-sh.org>
Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 8d4fbcfb
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
#define WARN_ON(condition) \ #define WARN_ON(condition) \
({ \ ({ \
typeof(condition) __ret_warn_on = (condition); \ int __ret_warn_on = !!(condition); \
if (unlikely(__ret_warn_on)) \ if (unlikely(__ret_warn_on)) \
_BUG_OR_WARN(BUGFLAG_WARNING); \ _BUG_OR_WARN(BUGFLAG_WARNING); \
unlikely(__ret_warn_on); \ unlikely(__ret_warn_on); \
......
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
#define WARN_ON(x) ({ \ #define WARN_ON(x) ({ \
typeof(x) __ret_warn_on = (x); \ int __ret_warn_on = !!(x); \
if (__builtin_constant_p(__ret_warn_on)) { \ if (__builtin_constant_p(__ret_warn_on)) { \
if (__ret_warn_on) \ if (__ret_warn_on) \
__WARN(); \ __WARN(); \
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
#define BUG() __EMIT_BUG(0) #define BUG() __EMIT_BUG(0)
#define WARN_ON(x) ({ \ #define WARN_ON(x) ({ \
typeof(x) __ret_warn_on = (x); \ int __ret_warn_on = !!(x); \
if (__builtin_constant_p(__ret_warn_on)) { \ if (__builtin_constant_p(__ret_warn_on)) { \
if (__ret_warn_on) \ if (__ret_warn_on) \
__EMIT_BUG(BUGFLAG_WARNING); \ __EMIT_BUG(BUGFLAG_WARNING); \
......
...@@ -61,7 +61,7 @@ do { \ ...@@ -61,7 +61,7 @@ do { \
} while (0) } while (0)
#define WARN_ON(x) ({ \ #define WARN_ON(x) ({ \
typeof(x) __ret_warn_on = (x); \ int __ret_warn_on = !!(x); \
if (__builtin_constant_p(__ret_warn_on)) { \ if (__builtin_constant_p(__ret_warn_on)) { \
if (__ret_warn_on) \ if (__ret_warn_on) \
__WARN(); \ __WARN(); \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册