Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934937AbXHAPTb (ORCPT ); Wed, 1 Aug 2007 11:19:31 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933695AbXHAPTL (ORCPT ); Wed, 1 Aug 2007 11:19:11 -0400 Received: from flvpn.ccur.com ([66.10.65.2]:57300 "EHLO gamx.iccur.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932926AbXHAPTJ (ORCPT ); Wed, 1 Aug 2007 11:19:09 -0400 Date: Wed, 1 Aug 2007 11:17:15 -0400 From: Joe Korty To: Paul Mackerras Cc: Linus Torvalds , Al Viro , Alexey Dobriyan , akpm@linux-foundation.org, linux-kernel@vger.kernel.org, herbert@gondor.apana.org.au Subject: Re: WARN_ON() which sometimes sucks Message-ID: <20070801151715.GA22431@tsunami.ccur.com> Reply-To: Joe Korty References: <20070731155527.GB7253@localhost.sw.ru> <20070731160248.GK21089@ftp.linux.org.uk> <18096.949.934194.648312@cargo.ozlabs.ibm.com> <18096.2592.877510.221163@cargo.ozlabs.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <18096.2592.877510.221163@cargo.ozlabs.ibm.com> User-Agent: Mutt/1.4.2.1i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 984 Lines: 29 On Wed, Aug 01, 2007 at 02:20:48PM +1000, Paul Mackerras wrote: > Linus Torvalds writes: > > > Umm. The WARN_ON() might actually get a "long long" value for all we know. > > Ie it's perfectly possible that the WARN_ON might look like > > > > /* Must not have high bits on */ > > WARN_ON(offset & 0xffffffff00000000); > > > > which on a 32-bit pcc would apparently do the wrong thing entirely as it > > stands now. No? > > Actually, because of the typeof in the powerpc WARN_ON, I think it > would fail to build since we'd be passing a long long value to an > inline asm, or at least I hope it would fail to build. :) Turning the condition into an integer should work ... #define NEW_WARN_ON(x) OLD_WARN_ON(!!(x)) Regards, Joe - 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/