From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [PATCH 4/11] arch/x86/kvm/vmx.c: trivial: use BUG_ON Date: Tue, 2 Aug 2011 13:44:12 -0300 Message-ID: <20110802164412.GC5144@amt.cnet> References: <1312281304-11847-1-git-send-email-julia@diku.dk> <1312281304-11847-5-git-send-email-julia@diku.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Avi Kivity , trivial@kernel.org, kernel-janitors@vger.kernel.org, Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org To: Julia Lawall Return-path: Received: from mx1.redhat.com ([209.132.183.28]:19798 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755042Ab1HBTIb (ORCPT ); Tue, 2 Aug 2011 15:08:31 -0400 Content-Disposition: inline In-Reply-To: <1312281304-11847-5-git-send-email-julia@diku.dk> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, Aug 02, 2011 at 12:34:57PM +0200, Julia Lawall wrote: > From: Julia Lawall > > Use BUG_ON(x) rather than if(x) BUG(); > > The semantic patch that fixes this problem is as follows: > (http://coccinelle.lip6.fr/) > > // > @@ identifier x; @@ > -if (x) BUG(); > +BUG_ON(x); > > @@ identifier x; @@ > -if (!x) BUG(); > +BUG_ON(!x); > // > > Signed-off-by: Julia Lawall Applied, thanks.