From: Paolo Bonzini <pbonzini@redhat.com>
To: Gleb Natapov <gleb@redhat.com>
Cc: linux-kernel@vger.kernel.org,
cornelia huck <cornelia.huck@de.ibm.com>,
kvm@vger.kernel.org
Subject: Re: [PATCH] KVM: introduce __kvm_io_bus_sort_cmp
Date: Wed, 31 Jul 2013 06:31:52 -0400 (EDT) [thread overview]
Message-ID: <1740231204.7441078.1375266712603.JavaMail.root@redhat.com> (raw)
In-Reply-To: <20130731090457.GB7484@redhat.com>
----- 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
prev parent reply other threads:[~2013-07-31 10:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-30 15:05 [PATCH] KVM: introduce __kvm_io_bus_sort_cmp Paolo Bonzini
2013-07-31 8:06 ` Cornelia Huck
2013-07-31 9:04 ` Gleb Natapov
2013-07-31 10:31 ` Paolo Bonzini [this message]
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=1740231204.7441078.1375266712603.JavaMail.root@redhat.com \
--to=pbonzini@redhat.com \
--cc=cornelia.huck@de.ibm.com \
--cc=gleb@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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