Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755139AbXHAWTS (ORCPT ); Wed, 1 Aug 2007 18:19:18 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753291AbXHAWTF (ORCPT ); Wed, 1 Aug 2007 18:19:05 -0400 Received: from mtagate4.uk.ibm.com ([195.212.29.137]:58728 "EHLO mtagate4.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753476AbXHAWTC (ORCPT ); Wed, 1 Aug 2007 18:19:02 -0400 Date: Thu, 2 Aug 2007 00:18:38 +0200 From: Heiko Carstens To: Linus Torvalds , Andrew Morton Cc: Alexey Dobriyan , Herbert Xu , Paul Mundt , Haavard Skinnemoen , Matthew Wilcox , Kyle McMartin , Martin Schwidefsky , linux-kernel@vger.kernel.org Subject: [PATCH] Fix WARN_ON() on bitfield ops for all other archs Message-ID: <20070801221838.GA9010@osiris.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.15 (2007-04-06) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2709 Lines: 77 From: Heiko Carstens Fixes WARN_ON() on bitfiels ops for all architectures that have been left out in 8d4fbcfbe0a4bfc73e7f0297c59ae514e1f1436f. Cc: Alexey Dobriyan Cc: Herbert Xu Cc: Paul Mundt Cc: Haavard Skinnemoen Cc: Matthew Wilcox Cc: Kyle McMartin Cc: Martin Schwidefsky Signed-off-by: Heiko Carstens --- 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(); \ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/