From: Paul Mackerras <paulus@samba.org>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org, agraf@suse.de,
kvm-ppc@vger.kernel.org, kvm@vger.kernel.org
Subject: Re: [PATCH 3/3] KVM: PPC: BOOK3S: HV: Rename variable for better readability
Date: Thu, 27 Nov 2014 11:45:26 +1100 [thread overview]
Message-ID: <20141127004526.GB778@iris.ozlabs.ibm.com> (raw)
In-Reply-To: <1413815340-22426-3-git-send-email-aneesh.kumar@linux.vnet.ibm.com>
On Mon, Oct 20, 2014 at 07:59:00PM +0530, Aneesh Kumar K.V wrote:
> Minor cleanup
>
> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
> ---
> arch/powerpc/kvm/book3s_hv_rm_mmu.c | 25 +++++++++++++------------
> 1 file changed, 13 insertions(+), 12 deletions(-)
>
> diff --git a/arch/powerpc/kvm/book3s_hv_rm_mmu.c b/arch/powerpc/kvm/book3s_hv_rm_mmu.c
> index 78e689b066f1..2922f8d127ff 100644
> --- a/arch/powerpc/kvm/book3s_hv_rm_mmu.c
> +++ b/arch/powerpc/kvm/book3s_hv_rm_mmu.c
> @@ -523,7 +523,7 @@ long kvmppc_h_bulk_remove(struct kvm_vcpu *vcpu)
> unsigned long *args = &vcpu->arch.gpr[4];
> __be64 *hp, *hptes[4];
> unsigned long tlbrb[4];
> - long int i, j, k, n, found, indexes[4];
> + long int i, j, k, collected_hpte, found, indexes[4];
Hmmm... I don't find it more readable, because "collected_hpte" sounds
like it contains a HPTE value. Also I don't like using a long name
for something that is just a temporary value inside a function, and
"n" is a suitable name for a temporary variable counting the number of
things we have. I would prefer just adding a comment like this:
- n = 0;
+ n = 0; /* # values collected in tlbrb[], indexes[] etc. */
Paul.
next prev parent reply other threads:[~2014-11-27 0:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-20 14:28 [PATCH 1/3] KVM: PPC: BOOK3S: HV: Add helpers for lock/unlock hpte Aneesh Kumar K.V
2014-10-20 14:28 ` [PATCH 2/3] KVM: PPC: BOOK3S: HV: Use unlock variant with memory barrier Aneesh Kumar K.V
2014-10-20 14:29 ` [PATCH 3/3] KVM: PPC: BOOK3S: HV: Rename variable for better readability Aneesh Kumar K.V
2014-11-27 0:45 ` Paul Mackerras [this message]
2015-01-13 5:09 ` [PATCH 1/3] KVM: PPC: BOOK3S: HV: Add helpers for lock/unlock hpte Aneesh Kumar K.V
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141127004526.GB778@iris.ozlabs.ibm.com \
--to=paulus@samba.org \
--cc=agraf@suse.de \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).