]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
virtio_ring: switch to use unsigned int for virtqueue_poll_packed()
authorJason Wang <jasowang@redhat.com>
Tue, 30 Dec 2025 06:46:42 +0000 (14:46 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 31 Dec 2025 10:39:18 +0000 (05:39 -0500)
Switch to use unsigned int for virtqueue_poll_packed() to match
virtqueue_poll() and virtqueue_poll_split() and to ease the
abstraction of the virtqueue ops.

Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20251230064649.55597-13-jasowang@redhat.com>

drivers/virtio/virtio_ring.c

index 09ebcb4e17e24b9e80138f9243f30f6daf39ae48..1832ea7982a66e67af002351e88b3e5df61f7372 100644 (file)
@@ -1698,7 +1698,8 @@ static inline bool is_used_desc_packed(const struct vring_virtqueue *vq,
        return avail == used && used == used_wrap_counter;
 }
 
-static bool virtqueue_poll_packed(const struct vring_virtqueue *vq, u16 off_wrap)
+static bool virtqueue_poll_packed(const struct vring_virtqueue *vq,
+                                 unsigned int off_wrap)
 {
        bool wrap_counter;
        u16 used_idx;