lkml.org 
[lkml]   [2013]   [Jul]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] KVM: introduce __kvm_io_bus_sort_cmp

----- Gleb Natapov <gleb@redhat.com> 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@redhat.com>
> > ---
> > 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


\
 
 \ /
  Last update: 2013-07-31 13:21    [W:0.052 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site