Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

virtio_ring: switch to use vring_virtqueue for detach_unused_buf variants

Those variants are used internally so let's switch to use
vring_virtqueue as parameter to be consistent with other internal
virtqueue helpers.

Acked-by: Eugenio Pérez <eperezma@redhat.com>
Reviewed-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Tested-by: Lei Yang <leiyang@redhat.com>
Reviewed-by: Eugenio Pérez <eperezma@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20251230064649.55597-12-jasowang@redhat.com>

authored by

Jason Wang and committed by
Michael S. Tsirkin
f2ad9d6b 7e810176

+5 -7
+5 -7
drivers/virtio/virtio_ring.c
··· 954 954 return true; 955 955 } 956 956 957 - static void *virtqueue_detach_unused_buf_split(struct virtqueue *_vq) 957 + static void *virtqueue_detach_unused_buf_split(struct vring_virtqueue *vq) 958 958 { 959 - struct vring_virtqueue *vq = to_vvq(_vq); 960 959 unsigned int i; 961 960 void *buf; 962 961 ··· 968 969 buf = vq->split.desc_state[i].data; 969 970 detach_buf_split(vq, i, NULL); 970 971 vq->split.avail_idx_shadow--; 971 - vq->split.vring.avail->idx = cpu_to_virtio16(_vq->vdev, 972 + vq->split.vring.avail->idx = cpu_to_virtio16(vq->vq.vdev, 972 973 vq->split.avail_idx_shadow); 973 974 END_USE(vq); 974 975 return buf; ··· 1890 1891 return true; 1891 1892 } 1892 1893 1893 - static void *virtqueue_detach_unused_buf_packed(struct virtqueue *_vq) 1894 + static void *virtqueue_detach_unused_buf_packed(struct vring_virtqueue *vq) 1894 1895 { 1895 - struct vring_virtqueue *vq = to_vvq(_vq); 1896 1896 unsigned int i; 1897 1897 void *buf; 1898 1898 ··· 2643 2645 { 2644 2646 struct vring_virtqueue *vq = to_vvq(_vq); 2645 2647 2646 - return vq->packed_ring ? virtqueue_detach_unused_buf_packed(_vq) : 2647 - virtqueue_detach_unused_buf_split(_vq); 2648 + return vq->packed_ring ? virtqueue_detach_unused_buf_packed(vq) : 2649 + virtqueue_detach_unused_buf_split(vq); 2648 2650 } 2649 2651 EXPORT_SYMBOL_GPL(virtqueue_detach_unused_buf); 2650 2652