From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ingo Molnar Subject: Re: [PATCH] kvm tools: Use assert() helper to check a variable value Date: Mon, 19 Dec 2011 09:04:23 +0100 Message-ID: <20111219080423.GA30432@elte.hu> References: <20111218213536.GB17380@moon> <20111219075738.GD17380@moon> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Pekka Enberg , Sasha Levin , Asias He , Thomas Gleixner , KVM-ML To: Cyrill Gorcunov Return-path: Received: from mx2.mail.elte.hu ([157.181.151.9]:32984 "EHLO mx2.mail.elte.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751839Ab1LSIGN (ORCPT ); Mon, 19 Dec 2011 03:06:13 -0500 Content-Disposition: inline In-Reply-To: <20111219075738.GD17380@moon> Sender: kvm-owner@vger.kernel.org List-ID: * Cyrill Gorcunov wrote: > On Mon, Dec 19, 2011 at 09:13:28AM +0200, Pekka Enberg wrote: > > > > > >- BUILD_BUG_ON(i > E820_X_MAX); > > >+ assert(i <= E820_X_MAX); > > > > We should use BUG_ON() like tools/perf does. > > > > We dont have it yet. So I'll introduce this helper later, > but note that we will have to cover _all_ assert() calls then, > so it's better to make in a separate patch. [...] There's only about a dozen of them, should be easy. Thanks, Ingo