Commit 96ef18a2 authored by Xuan Zhuo's avatar Xuan Zhuo Committed by Michael S. Tsirkin

virtio_ring: remove the arg vq of vring_alloc_desc_extra()

The parameter vq of vring_alloc_desc_extra() is useless. This patch
removes this parameter.

Subsequent patches will call this function to avoid passing useless
arguments.
Signed-off-by: default avatarXuan Zhuo <xuanzhuo@linux.alibaba.com>
Acked-by: default avatarJason Wang <jasowang@redhat.com>
Message-Id: <20220624025621.128843-6-xuanzhuo@linux.alibaba.com>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
parent c2a052a4
...@@ -1637,8 +1637,7 @@ static void *virtqueue_detach_unused_buf_packed(struct virtqueue *_vq) ...@@ -1637,8 +1637,7 @@ static void *virtqueue_detach_unused_buf_packed(struct virtqueue *_vq)
return NULL; return NULL;
} }
static struct vring_desc_extra *vring_alloc_desc_extra(struct vring_virtqueue *vq, static struct vring_desc_extra *vring_alloc_desc_extra(unsigned int num)
unsigned int num)
{ {
struct vring_desc_extra *desc_extra; struct vring_desc_extra *desc_extra;
unsigned int i; unsigned int i;
...@@ -1759,7 +1758,7 @@ static struct virtqueue *vring_create_virtqueue_packed( ...@@ -1759,7 +1758,7 @@ static struct virtqueue *vring_create_virtqueue_packed(
/* Put everything in free lists. */ /* Put everything in free lists. */
vq->free_head = 0; vq->free_head = 0;
vq->packed.desc_extra = vring_alloc_desc_extra(vq, num); vq->packed.desc_extra = vring_alloc_desc_extra(num);
if (!vq->packed.desc_extra) if (!vq->packed.desc_extra)
goto err_desc_extra; goto err_desc_extra;
...@@ -2248,7 +2247,7 @@ struct virtqueue *__vring_new_virtqueue(unsigned int index, ...@@ -2248,7 +2247,7 @@ struct virtqueue *__vring_new_virtqueue(unsigned int index,
if (!vq->split.desc_state) if (!vq->split.desc_state)
goto err_state; goto err_state;
vq->split.desc_extra = vring_alloc_desc_extra(vq, vring.num); vq->split.desc_extra = vring_alloc_desc_extra(vring.num);
if (!vq->split.desc_extra) if (!vq->split.desc_extra)
goto err_extra; goto err_extra;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment