From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Arnd Bergmann Date: Tue, 28 May 2013 19:20:37 +0200 References: <519DCBEF.3090208@asianux.com> <201305281743.52649.arnd@arndb.de> <51A4D618.3080208@zytor.com> In-Reply-To: <51A4D618.3080208@zytor.com> MIME-Version: 1.0 Message-Id: <201305281920.37452.arnd@arndb.de> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linuxppc-dev-bounces+geert=linux-m68k.org@lists.ozlabs.org Sender: "Linuxppc-dev" Subject: Re: [PATCH] arch: configuration, deleting 'CONFIG_BUG' since always need it. To: "H. Peter Anvin" Cc: Catalin Marinas , Linux-sh list , Chen Gang , Heiko Carstens , "paulus@samba.org" , Michel Lespinasse , Ingo Molnar , Hans-Christian Egtvedt , Linux-Arch , linux-s390@vger.kernel.org, Russell King - ARM Linux , Yoshinori Sato , Richard Weinberger , Helge Deller , the arch/x86 maintainers , "James E.J. Bottomley" , "mingo@redhat.com" , Geert Uytterhoeven , Frederic Weisbecker , Paul McKenney , H?vard Skinnemoen , Serge Hallyn , Mike Frysinger , uml-devel , Will Deacon , Jeff Dike , Akinobu Mita , uml-user , "uclinux-dist-devel@blackfin.uclinux.org" , Thomas Gleixner , "linux-arm-kernel@lists.infradead.org" , Parisc List , Linus Torvalds , "linux-kernel@vger.kernel.org" , Richard Kuo , Paul Mundt , "Eric W. Biederman" , linux-hexagon@vger.kernel.org, Martin Schwidefsky , linux390@de.ibm.com, Andrew Morton , "linuxppc-dev@lists.ozlabs.org" , David Miller List-ID: On Tuesday 28 May 2013, H. Peter Anvin wrote: > On 05/28/2013 08:43 AM, Arnd Bergmann wrote: > > > > Right, that is what the patch I just posted does. > > > > On a related note, I found that WARN_ON() can no longer be compiled > > out since there is already code that relies on the side-effects of > > the condition. I assume that was an intentional change I missed, > > since it used to be defined so that you could remove it completely. > > > > It is possible to define WARN_ON() as: > > #define WARN_ON(x) ((void)(x)) > > ... which preserves side effects. Yes, actually the return value has to be maintained as well. The current (!CONFIG_BUG) default implementation is #define WARN_ON(condition) ({ \ int __ret_warn_on = !!(condition); \ unlikely(__ret_warn_on); \ }) which seems fine. #define WARN_ON(condition) unlikely(!!(condition)) is probably just as good. Arnd _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev