diff mbox

[PATCHv6,2/4] virtio: find_vqs/del_vqs virtio operations

Message ID 200905151420.02235.rusty@rustcorp.com.au (mailing list archive)
State New, archived
Headers show

Commit Message

Rusty Russell May 15, 2009, 4:50 a.m. UTC
And here's the fixup patch I applied:


--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/lguest/lguest_device.c b/drivers/lguest/lguest_device.c
--- a/drivers/lguest/lguest_device.c
+++ b/drivers/lguest/lguest_device.c
@@ -318,11 +318,11 @@  static void lg_del_vqs(struct virtio_dev
 	struct virtqueue *vq, *n;
 
 	list_for_each_entry_safe(vq, n, &vdev->vqs, list)
-		kvm_del_vq(vq);
+		lg_del_vq(vq);
 }
 
 static int lg_find_vqs(struct virtio_device *vdev, unsigned nvqs,
-		       struct virtqueue *vqs[]
+		       struct virtqueue *vqs[],
 		       vq_callback_t *callbacks[],
 		       const char *names[])
 {
@@ -331,7 +331,7 @@  static int lg_find_vqs(struct virtio_dev
 
 	/* We must have this many virtqueues. */
 	if (nvqs > ldev->desc->num_vq)
-		return ERR_PTR(-ENOENT);
+		return -ENOENT;
 
 	for (i = 0; i < nvqs; ++i) {
 		vqs[i] = lg_find_vq(vdev, i, callbacks[i], names[i]);
@@ -341,7 +341,7 @@  static int lg_find_vqs(struct virtio_dev
 	return 0;
 
 error:
-	vp_del_vqs(vdev);
+	lg_del_vqs(vdev);
 	return PTR_ERR(vqs[i]);
 }
 
diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c
--- a/net/9p/trans_virtio.c
+++ b/net/9p/trans_virtio.c
@@ -260,7 +260,7 @@  static int p9_virtio_probe(struct virtio
 	return 0;
 
 out_free_vq:
-	vdev->config->del_vq(chan->vq);
+	vdev->config->del_vqs(vdev);
 fail:
 	mutex_lock(&virtio_9p_lock);
 	chan_index--;
@@ -331,7 +331,7 @@  static void p9_virtio_remove(struct virt
 	BUG_ON(chan->inuse);
 
 	if (chan->initialized) {
-		vdev->config->del_vq(chan->vq);
+		vdev->config->del_vqs(vdev);
 		chan->initialized = false;
 	}
 }