Skip to content

Commit c62f61b

Browse files
committed
virtio-mmio: Revert "virtio_mmio: support the arg sizes of find_vqs()"
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 <[email protected]> Message-Id: <[email protected]>
1 parent 484b9fa commit c62f61b

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

drivers/virtio/virtio_mmio.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ static void vm_synchronize_cbs(struct virtio_device *vdev)
360360

361361
static struct virtqueue *vm_setup_vq(struct virtio_device *vdev, unsigned int index,
362362
void (*callback)(struct virtqueue *vq),
363-
const char *name, u32 size, bool ctx)
363+
const char *name, bool ctx)
364364
{
365365
struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev);
366366
struct virtio_mmio_vq_info *info;
@@ -395,11 +395,8 @@ static struct virtqueue *vm_setup_vq(struct virtio_device *vdev, unsigned int in
395395
goto error_new_virtqueue;
396396
}
397397

398-
if (!size || size > num)
399-
size = num;
400-
401398
/* Create the vring */
402-
vq = vring_create_virtqueue(index, size, VIRTIO_MMIO_VRING_ALIGN, vdev,
399+
vq = vring_create_virtqueue(index, num, VIRTIO_MMIO_VRING_ALIGN, vdev,
403400
true, true, ctx, vm_notify, callback, name);
404401
if (!vq) {
405402
err = -ENOMEM;
@@ -503,7 +500,6 @@ static int vm_find_vqs(struct virtio_device *vdev, unsigned int nvqs,
503500
}
504501

505502
vqs[i] = vm_setup_vq(vdev, queue_idx++, callbacks[i], names[i],
506-
sizes ? sizes[i] : 0,
507503
ctx ? ctx[i] : false);
508504
if (IS_ERR(vqs[i])) {
509505
vm_del_vqs(vdev);

0 commit comments

Comments
 (0)