aboutsummaryrefslogtreecommitdiffstats
path: root/virt/kvm/kvm_main.c
diff options
context:
space:
mode:
authorStephen Hemminger <stephen@networkplumber.org>2013-12-29 15:13:08 -0500
committerMarcelo Tosatti <mtosatti@redhat.com>2014-01-08 16:03:00 -0500
commitea0269bc34a7df6bda1ee862ad198dee0839f170 (patch)
tree5d7d3f00b13f9374bd8b8cb3ee3a6406ef7e4d89 /virt/kvm/kvm_main.c
parent7940876e1330671708186ac3386aa521ffb5c182 (diff)
kvm: remove dead code
The function kvm_io_bus_read_cookie is defined but never used in current in-tree code. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'virt/kvm/kvm_main.c')
-rw-r--r--virt/kvm/kvm_main.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index e7c6ddd8ecc0..b28579e84248 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -2934,33 +2934,6 @@ int kvm_io_bus_read(struct kvm *kvm, enum kvm_bus bus_idx, gpa_t addr,
2934 return r < 0 ? r : 0; 2934 return r < 0 ? r : 0;
2935} 2935}
2936 2936
2937/* kvm_io_bus_read_cookie - called under kvm->slots_lock */
2938int kvm_io_bus_read_cookie(struct kvm *kvm, enum kvm_bus bus_idx, gpa_t addr,
2939 int len, void *val, long cookie)
2940{
2941 struct kvm_io_bus *bus;
2942 struct kvm_io_range range;
2943
2944 range = (struct kvm_io_range) {
2945 .addr = addr,
2946 .len = len,
2947 };
2948
2949 bus = srcu_dereference(kvm->buses[bus_idx], &kvm->srcu);
2950
2951 /* First try the device referenced by cookie. */
2952 if ((cookie >= 0) && (cookie < bus->dev_count) &&
2953 (kvm_io_bus_cmp(&range, &bus->range[cookie]) == 0))
2954 if (!kvm_iodevice_read(bus->range[cookie].dev, addr, len,
2955 val))
2956 return cookie;
2957
2958 /*
2959 * cookie contained garbage; fall back to search and return the
2960 * correct cookie value.
2961 */
2962 return __kvm_io_bus_read(bus, &range, val);
2963}
2964 2937
2965/* Caller must hold slots_lock. */ 2938/* Caller must hold slots_lock. */
2966int kvm_io_bus_register_dev(struct kvm *kvm, enum kvm_bus bus_idx, gpa_t addr, 2939int kvm_io_bus_register_dev(struct kvm *kvm, enum kvm_bus bus_idx, gpa_t addr,