aboutsummaryrefslogtreecommitdiffstats
path: root/virt/kvm/kvm_main.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2013-08-27 09:41:41 -0400
committerGleb Natapov <gleb@redhat.com>2013-08-28 02:39:40 -0400
commitc21fbff16b5d43d608966a2963fb248bebce257f (patch)
tree086c6f6b90fa206d5d411498aa84355955f8d441 /virt/kvm/kvm_main.c
parent11feeb498086a3a5907b8148bdf1786a9b18fc55 (diff)
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: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Gleb Natapov <gleb@redhat.com>
Diffstat (limited to 'virt/kvm/kvm_main.c')
-rw-r--r--virt/kvm/kvm_main.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 0fc25aed79a8..bf040c4e02b3 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -2795,8 +2795,8 @@ static void kvm_io_bus_destroy(struct kvm_io_bus *bus)
2795 kfree(bus); 2795 kfree(bus);
2796} 2796}
2797 2797
2798static inline int __kvm_io_bus_sort_cmp(const struct kvm_io_range *r1, 2798static inline int kvm_io_bus_cmp(const struct kvm_io_range *r1,
2799 const struct kvm_io_range *r2) 2799 const struct kvm_io_range *r2)
2800{ 2800{
2801 if (r1->addr < r2->addr) 2801 if (r1->addr < r2->addr)
2802 return -1; 2802 return -1;
@@ -2807,7 +2807,7 @@ static inline int __kvm_io_bus_sort_cmp(const struct kvm_io_range *r1,
2807 2807
2808static int kvm_io_bus_sort_cmp(const void *p1, const void *p2) 2808static int kvm_io_bus_sort_cmp(const void *p1, const void *p2)
2809{ 2809{
2810 return __kvm_io_bus_sort_cmp(p1, p2); 2810 return kvm_io_bus_cmp(p1, p2);
2811} 2811}
2812 2812
2813static int kvm_io_bus_insert_dev(struct kvm_io_bus *bus, struct kvm_io_device *dev, 2813static 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,
2843 2843
2844 off = range - bus->range; 2844 off = range - bus->range;
2845 2845
2846 while (off > 0 && __kvm_io_bus_sort_cmp(&key, &bus->range[off-1]) == 0) 2846 while (off > 0 && kvm_io_bus_cmp(&key, &bus->range[off-1]) == 0)
2847 off--; 2847 off--;
2848 2848
2849 return off; 2849 return off;
@@ -2859,7 +2859,7 @@ static int __kvm_io_bus_write(struct kvm_io_bus *bus,
2859 return -EOPNOTSUPP; 2859 return -EOPNOTSUPP;
2860 2860
2861 while (idx < bus->dev_count && 2861 while (idx < bus->dev_count &&
2862 __kvm_io_bus_sort_cmp(range, &bus->range[idx]) == 0) { 2862 kvm_io_bus_cmp(range, &bus->range[idx]) == 0) {
2863 if (!kvm_iodevice_write(bus->range[idx].dev, range->addr, 2863 if (!kvm_iodevice_write(bus->range[idx].dev, range->addr,
2864 range->len, val)) 2864 range->len, val))
2865 return idx; 2865 return idx;
@@ -2903,7 +2903,7 @@ int kvm_io_bus_write_cookie(struct kvm *kvm, enum kvm_bus bus_idx, gpa_t addr,
2903 2903
2904 /* First try the device referenced by cookie. */ 2904 /* First try the device referenced by cookie. */
2905 if ((cookie >= 0) && (cookie < bus->dev_count) && 2905 if ((cookie >= 0) && (cookie < bus->dev_count) &&
2906 (__kvm_io_bus_sort_cmp(&range, &bus->range[cookie]) == 0)) 2906 (kvm_io_bus_cmp(&range, &bus->range[cookie]) == 0))
2907 if (!kvm_iodevice_write(bus->range[cookie].dev, addr, len, 2907 if (!kvm_iodevice_write(bus->range[cookie].dev, addr, len,
2908 val)) 2908 val))
2909 return cookie; 2909 return cookie;
@@ -2925,7 +2925,7 @@ static int __kvm_io_bus_read(struct kvm_io_bus *bus, struct kvm_io_range *range,
2925 return -EOPNOTSUPP; 2925 return -EOPNOTSUPP;
2926 2926
2927 while (idx < bus->dev_count && 2927 while (idx < bus->dev_count &&
2928 __kvm_io_bus_sort_cmp(range, &bus->range[idx]) == 0) { 2928 kvm_io_bus_cmp(range, &bus->range[idx]) == 0) {
2929 if (!kvm_iodevice_read(bus->range[idx].dev, range->addr, 2929 if (!kvm_iodevice_read(bus->range[idx].dev, range->addr,
2930 range->len, val)) 2930 range->len, val))
2931 return idx; 2931 return idx;
@@ -2969,7 +2969,7 @@ int kvm_io_bus_read_cookie(struct kvm *kvm, enum kvm_bus bus_idx, gpa_t addr,
2969 2969
2970 /* First try the device referenced by cookie. */ 2970 /* First try the device referenced by cookie. */
2971 if ((cookie >= 0) && (cookie < bus->dev_count) && 2971 if ((cookie >= 0) && (cookie < bus->dev_count) &&
2972 (__kvm_io_bus_sort_cmp(&range, &bus->range[cookie]) == 0)) 2972 (kvm_io_bus_cmp(&range, &bus->range[cookie]) == 0))
2973 if (!kvm_iodevice_read(bus->range[cookie].dev, addr, len, 2973 if (!kvm_iodevice_read(bus->range[cookie].dev, addr, len,
2974 val)) 2974 val))
2975 return cookie; 2975 return cookie;