public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Heiko Carstens <heiko.carstens@de.ibm.com>
To: Linus Torvalds <torvalds@linux-foundation.org>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: Alexey Dobriyan <adobriyan@sw.ru>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	Paul Mundt <lethal@linux-sh.org>,
	Haavard Skinnemoen <hskinnemoen@atmel.com>,
	Matthew Wilcox <matthew@wil.cx>,
	Kyle McMartin <kyle@parisc-linux.org>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH] Fix WARN_ON() on bitfield ops for all other archs
Date: Thu, 2 Aug 2007 00:18:38 +0200	[thread overview]
Message-ID: <20070801221838.GA9010@osiris.ibm.com> (raw)

From: Heiko Carstens <heiko.carstens@de.ibm.com>

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: Paul Mundt <lethal@linux-sh.org>
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>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
---
 include/asm-avr32/bug.h  |    2 +-
 include/asm-parisc/bug.h |    2 +-
 include/asm-s390/bug.h   |    2 +-
 include/asm-sh/bug.h     |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

Index: linux-2.6/include/asm-avr32/bug.h
===================================================================
--- linux-2.6.orig/include/asm-avr32/bug.h
+++ linux-2.6/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);				\
Index: linux-2.6/include/asm-parisc/bug.h
===================================================================
--- linux-2.6.orig/include/asm-parisc/bug.h
+++ linux-2.6/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();				\
Index: linux-2.6/include/asm-s390/bug.h
===================================================================
--- linux-2.6.orig/include/asm-s390/bug.h
+++ linux-2.6/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);	\
Index: linux-2.6/include/asm-sh/bug.h
===================================================================
--- linux-2.6.orig/include/asm-sh/bug.h
+++ linux-2.6/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();				\

             reply	other threads:[~2007-08-01 22:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-01 22:18 Heiko Carstens [this message]
2007-08-02  3:04 ` [PATCH] Fix WARN_ON() on bitfield ops for all other archs Paul Mundt
2007-08-02  3:44 ` Satyam Sharma

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070801221838.GA9010@osiris.ibm.com \
    --to=heiko.carstens@de.ibm.com \
    --cc=adobriyan@sw.ru \
    --cc=akpm@linux-foundation.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=hskinnemoen@atmel.com \
    --cc=kyle@parisc-linux.org \
    --cc=lethal@linux-sh.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthew@wil.cx \
    --cc=schwidefsky@de.ibm.com \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox