From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takuya Yoshikawa Subject: Re: [PATCH 1/8] KVM: MMU: Fix and clean up for_each_gfn_* macros Date: Mon, 28 Jan 2013 21:29:47 +0900 Message-ID: <20130128212947.b9b7dc2f49250fb16ba526ea@gmail.com> References: <20130123191231.d66489d2.yoshikawa_takuya_b1@lab.ntt.co.jp> <20130123191321.e280cec8.yoshikawa_takuya_b1@lab.ntt.co.jp> <20130128122425.GC22871@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Takuya Yoshikawa , mtosatti@redhat.com, kvm@vger.kernel.org To: Gleb Natapov Return-path: Received: from mail-pa0-f46.google.com ([209.85.220.46]:55601 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757391Ab3A1M3w (ORCPT ); Mon, 28 Jan 2013 07:29:52 -0500 Received: by mail-pa0-f46.google.com with SMTP id kp14so1489316pab.5 for ; Mon, 28 Jan 2013 04:29:51 -0800 (PST) In-Reply-To: <20130128122425.GC22871@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Mon, 28 Jan 2013 14:24:25 +0200 Gleb Natapov wrote: > On Wed, Jan 23, 2013 at 07:13:21PM +0900, Takuya Yoshikawa wrote: > > The expression (sp)->gfn should not be expanded using @gfn. > > > > Although no user of these macros passes a string other than gfn now, > > this should be fixed before anyone sees strange errors. > > > > Also, the counter-intuitive conditions, which had been used before these > > macros were introduced to avoid extra indentations, should not be used. > > > Not sure what do you mean here. This counter-intuitive conditions are > used so that if "else" follows the macro it will not be interpreted as > belonging to the hidden if(). Like in the following code: > > if (x) > for_each_gfn_sp() > else > do_y(); > > You do not expect do_y() to be called for each sp->gfn != gfn. I could not think of this case. Will fix not to change the current conditions. Thanks, Takuya