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;
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,
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;
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;
/* 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;
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;
/* 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;