From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Date: Tue, 02 Aug 2011 16:44:12 +0000 Subject: Re: [PATCH 4/11] arch/x86/kvm/vmx.c: trivial: use BUG_ON Message-Id: <20110802164412.GC5144@amt.cnet> List-Id: References: <1312281304-11847-1-git-send-email-julia@diku.dk> <1312281304-11847-5-git-send-email-julia@diku.dk> In-Reply-To: <1312281304-11847-5-git-send-email-julia@diku.dk> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Julia Lawall 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 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.