From: Paolo Bonzini <pbonzini@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: kvm@vger.kernel.org, gnatapov@redhat.com
Subject: [PATCH 1/3] KVM: rename __kvm_io_bus_sort_cmp to kvm_io_bus_cmp
Date: Tue, 27 Aug 2013 15:41:41 +0200 [thread overview]
Message-ID: <1377610903-12356-2-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1377610903-12356-1-git-send-email-pbonzini@redhat.com>
This is the type-safe comparison function, so the double-underscore is
not related.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
virt/kvm/kvm_main.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index c6c8bbe..f7e4334 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -2815,8 +2815,8 @@ static void kvm_io_bus_destroy(struct kvm_io_bus *bus)
kfree(bus);
}
-static inline int __kvm_io_bus_sort_cmp(const struct kvm_io_range *r1,
- const struct kvm_io_range *r2)
+static inline int kvm_io_bus_cmp(const struct kvm_io_range *r1,
+ const struct kvm_io_range *r2)
{
if (r1->addr < r2->addr)
return -1;
@@ -2827,7 +2827,7 @@ static inline int __kvm_io_bus_sort_cmp(const struct kvm_io_range *r1,
static int kvm_io_bus_sort_cmp(const void *p1, const void *p2)
{
- return __kvm_io_bus_sort_cmp(p1, p2);
+ return kvm_io_bus_cmp(p1, p2);
}
static int kvm_io_bus_insert_dev(struct kvm_io_bus *bus, struct kvm_io_device *dev,
@@ -2863,7 +2863,7 @@ static int kvm_io_bus_get_first_dev(struct kvm_io_bus *bus,
off = range - bus->range;
- while (off > 0 && __kvm_io_bus_sort_cmp(&key, &bus->range[off-1]) == 0)
+ while (off > 0 && kvm_io_bus_cmp(&key, &bus->range[off-1]) == 0)
off--;
return off;
@@ -2879,7 +2879,7 @@ static int __kvm_io_bus_write(struct kvm_io_bus *bus,
return -EOPNOTSUPP;
while (idx < bus->dev_count &&
- __kvm_io_bus_sort_cmp(range, &bus->range[idx]) == 0) {
+ kvm_io_bus_cmp(range, &bus->range[idx]) == 0) {
if (!kvm_iodevice_write(bus->range[idx].dev, range->addr,
range->len, val))
return idx;
@@ -2923,7 +2923,7 @@ int kvm_io_bus_write_cookie(struct kvm *kvm, enum kvm_bus bus_idx, gpa_t addr,
/* First try the device referenced by cookie. */
if ((cookie >= 0) && (cookie < bus->dev_count) &&
- (__kvm_io_bus_sort_cmp(&range, &bus->range[cookie]) == 0))
+ (kvm_io_bus_cmp(&range, &bus->range[cookie]) == 0))
if (!kvm_iodevice_write(bus->range[cookie].dev, addr, len,
val))
return cookie;
@@ -2945,7 +2945,7 @@ static int __kvm_io_bus_read(struct kvm_io_bus *bus, struct kvm_io_range *range,
return -EOPNOTSUPP;
while (idx < bus->dev_count &&
- __kvm_io_bus_sort_cmp(range, &bus->range[idx]) == 0) {
+ kvm_io_bus_cmp(range, &bus->range[idx]) == 0) {
if (!kvm_iodevice_read(bus->range[idx].dev, range->addr,
range->len, val))
return idx;
@@ -2989,7 +2989,7 @@ int kvm_io_bus_read_cookie(struct kvm *kvm, enum kvm_bus bus_idx, gpa_t addr,
/* First try the device referenced by cookie. */
if ((cookie >= 0) && (cookie < bus->dev_count) &&
- (__kvm_io_bus_sort_cmp(&range, &bus->range[cookie]) == 0))
+ (kvm_io_bus_cmp(&range, &bus->range[cookie]) == 0))
if (!kvm_iodevice_read(bus->range[cookie].dev, addr, len,
val))
return cookie;
--
1.8.3.1
next prev parent reply other threads:[~2013-08-27 13:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-27 13:41 [PATCH 0/3] Trivial KVM patches for 3.12 Paolo Bonzini
2013-08-27 13:41 ` Paolo Bonzini [this message]
2013-08-27 13:41 ` [PATCH 2/3] KVM: vmx: count exits to userspace during invalid guest emulation Paolo Bonzini
2013-08-27 13:41 ` [PATCH 3/3] KVM: x86: add comments where MMIO does not return to the emulator Paolo Bonzini
2013-08-28 6:40 ` [PATCH 0/3] Trivial KVM patches for 3.12 Gleb Natapov
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=1377610903-12356-2-git-send-email-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=gnatapov@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
all inboxes | Powered by JetHome®