summaryrefslogtreecommitdiff
path: root/drivers/virtio/virtio_mmio.c
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2022-08-16 08:36:35 +0300
committerMichael S. Tsirkin <mst@redhat.com>2022-08-16 08:38:29 +0300
commitc62f61b58f6e41cab9c07557213b61d71e6b221c (patch)
tree70da8dcb740aec6305f80372ce33bcec4c5c731d /drivers/virtio/virtio_mmio.c
parent484b9fa4886bd9377969aad5e9ea17efda4ecda6 (diff)
downloadlinux-c62f61b58f6e41cab9c07557213b61d71e6b221c.tar.xz
virtio-mmio: Revert "virtio_mmio: support the arg sizes of find_vqs()"
This reverts commit fbed86abba6e0472d98079790e58060e4332608a. The API is now unused, let's not carry dead code around. Fixes: fbed86abba6e ("virtio_mmio: support the arg sizes of find_vqs()") Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Message-Id: <20220816053602.173815-4-mst@redhat.com>
Diffstat (limited to 'drivers/virtio/virtio_mmio.c')
-rw-r--r--drivers/virtio/virtio_mmio.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c
index c492a57531c6..dfcecfd7aba1 100644
--- a/drivers/virtio/virtio_mmio.c
+++ b/drivers/virtio/virtio_mmio.c
@@ -360,7 +360,7 @@ static void vm_synchronize_cbs(struct virtio_device *vdev)
static struct virtqueue *vm_setup_vq(struct virtio_device *vdev, unsigned int index,
void (*callback)(struct virtqueue *vq),
- const char *name, u32 size, bool ctx)
+ const char *name, bool ctx)
{
struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev);
struct virtio_mmio_vq_info *info;
@@ -395,11 +395,8 @@ static struct virtqueue *vm_setup_vq(struct virtio_device *vdev, unsigned int in
goto error_new_virtqueue;
}
- if (!size || size > num)
- size = num;
-
/* Create the vring */
- vq = vring_create_virtqueue(index, size, VIRTIO_MMIO_VRING_ALIGN, vdev,
+ vq = vring_create_virtqueue(index, num, VIRTIO_MMIO_VRING_ALIGN, vdev,
true, true, ctx, vm_notify, callback, name);
if (!vq) {
err = -ENOMEM;
@@ -503,7 +500,6 @@ static int vm_find_vqs(struct virtio_device *vdev, unsigned int nvqs,
}
vqs[i] = vm_setup_vq(vdev, queue_idx++, callbacks[i], names[i],
- sizes ? sizes[i] : 0,
ctx ? ctx[i] : false);
if (IS_ERR(vqs[i])) {
vm_del_vqs(vdev);