Re: [PATCH 1/4] KVM: Provide function for VCPU lookup by id
> > 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 -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/4] KVM: Provide function for VCPU lookup by id
> On 11/19/2015 02:13 PM, Paolo Bonzini wrote: > > > > > > On 19/11/2015 13:55, David Hildenbrand wrote: > >>>> > >>>> 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? > > > > Having _by_id at the end of the name makes sense indeed. > > David, > I will fix up the function name myself to kvm_get_vcpu_by_id. Ok? Sure, thanks a lot! David -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html