Re: [PATCH] KVM: introduce __kvm_io_bus_sort_cmp

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



----- Gleb Natapov <gleb@xxxxxxxxxx> wrote:
> On Tue, Jul 30, 2013 at 05:05:37PM +0200, Paolo Bonzini wrote:
> > kvm_io_bus_sort_cmp is used also directly, not just as a callback for
> > sort and bsearch.  In these cases, it is handy to have a type-safe
> > variant.  This patch introduces such a variant, __kvm_io_bus_sort_cmp,
> > and uses it throughout kvm_main.c.
> > 
> > Signed-off-by: Paolo Bonzini <pbonzini@xxxxxxxxxx>
> > ---
> >  virt/kvm/kvm_main.c | 21 ++++++++++++---------
> >  1 file changed, 12 insertions(+), 9 deletions(-)
> > 
> > diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
> > index b2a2bb9..e0d127d 100644
> > --- a/virt/kvm/kvm_main.c
> > +++ b/virt/kvm/kvm_main.c
> > @@ -2812,11 +2812,9 @@ static void kvm_io_bus_destroy(struct kvm_io_bus *bus)
> >  	kfree(bus);
> >  }
> >  
> > -static int kvm_io_bus_sort_cmp(const void *p1, const void *p2)
> > +static inline int __kvm_io_bus_sort_cmp(const struct kvm_io_range *r1,
> > +                                        const struct kvm_io_range *r2)
> IMO calling this one kvm_io_bus_sort_cmp and another one
> kvm_io_bus_cmp will be better naming.

Ok.

Paolo
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux