Skip to content

Commit

Permalink
virtio-mmio: Revert "virtio_mmio: support the arg sizes of find_vqs()"
Browse files Browse the repository at this point in the history
This reverts commit fbed86a.
The API is now unused, let's not carry dead code around.

Fixes: fbed86a ("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>
  • Loading branch information
Michael S. Tsirkin committed Aug 16, 2022
1 parent 484b9fa commit c62f61b
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions drivers/virtio/virtio_mmio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit c62f61b

Please sign in to comment.