From: David Hildenbrand <dahi@linux.vnet.ibm.com>
To: Thomas Huth <thuth@redhat.com>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Alexander Graf <agraf@suse.de>, Paul Mackerras <paulus@samba.org>,
KVM <kvm@vger.kernel.org>,
Cornelia Huck <cornelia.huck@de.ibm.com>,
Jens Freimann <jfrei@linux.vnet.ibm.com>,
linux-s390 <linux-s390@vger.kernel.org>,
kvm-ppc@vger.kernel.org
Subject: Re: [PATCH 1/4] KVM: Provide function for VCPU lookup by id
Date: Thu, 19 Nov 2015 13:55:27 +0100 [thread overview]
Message-ID: <20151119135527.77ab6fda@thinkpad-w530> (raw)
In-Reply-To: <564DBC88.5020508@redhat.com>
>
> Any chance that you name this function differently? Otherwise we've got
> two functions that sound very similar and also have similar prototypes:
>
> - kvm_get_vcpu(struct kvm *kvm, int i)
> - kvm_lookup_vcpu(struct kvm *kvm, int id)
>
> I'm pretty sure this will cause confusion in the future!
> ==> Could you maybe name the new function something like
> "kvm_lookup_vcpu_by_id" or "kvm_get_vcpu_by_id" instead?
Had that in a previous version but decided to name it that way ... hmm ...
other opinions?
>
> Also a short comment before the function would be nice to make the
> reader aware of the difference (e.g. when hot-plugging) between the
> vcpu-id and array-id.
Also not sure as the header directly includes the (for my eyes ;) ) easy code.
I would agree for a pure prototype. Other opinions?
>
> Otherwise: +1 for finally having a proper common function for this!
>
Thanks for having a look Thomas!
David
next prev parent reply other threads:[~2015-11-19 12:55 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-19 8:37 [PATCH 0/4] Preview: vcpu lookup by id changes Christian Borntraeger
2015-11-19 8:37 ` [PATCH 1/4] KVM: Provide function for VCPU lookup by id Christian Borntraeger
2015-11-19 12:11 ` Thomas Huth
2015-11-19 12:55 ` David Hildenbrand [this message]
2015-11-19 13:13 ` Paolo Bonzini
2015-11-19 13:23 ` Christian Borntraeger
2015-11-19 13:36 ` David Hildenbrand
2015-11-19 8:37 ` [PATCH 2/4] KVM: s390: fix wrong lookup of VCPUs by array index Christian Borntraeger
2015-11-19 8:52 ` Christian Borntraeger
2015-11-19 8:37 ` [PATCH 3/4] KVM: use heuristic for fast VCPU lookup by id Christian Borntraeger
2015-11-19 8:37 ` [PATCH 4/4] KVM: Use common function for " Christian Borntraeger
2015-11-19 9:38 ` [PATCH 0/4] Preview: vcpu lookup by id changes Paolo Bonzini
2015-11-19 9:51 ` Christian Borntraeger
2015-11-19 9:52 ` Paolo Bonzini
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=20151119135527.77ab6fda@thinkpad-w530 \
--to=dahi@linux.vnet.ibm.com \
--cc=agraf@suse.de \
--cc=borntraeger@de.ibm.com \
--cc=cornelia.huck@de.ibm.com \
--cc=jfrei@linux.vnet.ibm.com \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=paulus@samba.org \
--cc=pbonzini@redhat.com \
--cc=thuth@redhat.com \
/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).