Commit c21fbff1 authored by Paolo Bonzini's avatar Paolo Bonzini Committed by Gleb Natapov

KVM: rename __kvm_io_bus_sort_cmp to kvm_io_bus_cmp

This is the type-safe comparison function, so the double-underscore is
not related.
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Signed-off-by: default avatarGleb Natapov <gleb@redhat.com>
parent 11feeb49
......@@ -2795,8 +2795,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;
......@@ -2807,7 +2807,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,
......@@ -2843,7 +2843,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;
......@@ -2859,7 +2859,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;
......@@ -2903,7 +2903,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;
......@@ -2925,7 +2925,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;
......@@ -2969,7 +2969,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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment