Skip to content

Commit 96ef18a

Browse files
fengidrimstsirkin
authored andcommitted
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: Xuan Zhuo <xuanzhuo@linux.alibaba.com> Acked-by: Jason Wang <jasowang@redhat.com> Message-Id: <20220624025621.128843-6-xuanzhuo@linux.alibaba.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
1 parent c2a052a commit 96ef18a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

drivers/virtio/virtio_ring.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1637,8 +1637,7 @@ static void *virtqueue_detach_unused_buf_packed(struct virtqueue *_vq)
16371637
return NULL;
16381638
}
16391639

1640-
static struct vring_desc_extra *vring_alloc_desc_extra(struct vring_virtqueue *vq,
1641-
unsigned int num)
1640+
static struct vring_desc_extra *vring_alloc_desc_extra(unsigned int num)
16421641
{
16431642
struct vring_desc_extra *desc_extra;
16441643
unsigned int i;
@@ -1759,7 +1758,7 @@ static struct virtqueue *vring_create_virtqueue_packed(
17591758
/* Put everything in free lists. */
17601759
vq->free_head = 0;
17611760

1762-
vq->packed.desc_extra = vring_alloc_desc_extra(vq, num);
1761+
vq->packed.desc_extra = vring_alloc_desc_extra(num);
17631762
if (!vq->packed.desc_extra)
17641763
goto err_desc_extra;
17651764

@@ -2248,7 +2247,7 @@ struct virtqueue *__vring_new_virtqueue(unsigned int index,
22482247
if (!vq->split.desc_state)
22492248
goto err_state;
22502249

2251-
vq->split.desc_extra = vring_alloc_desc_extra(vq, vring.num);
2250+
vq->split.desc_extra = vring_alloc_desc_extra(vring.num);
22522251
if (!vq->split.desc_extra)
22532252
goto err_extra;
22542253

0 commit comments

Comments
 (0)