]> git.proxmox.com Git - mirror_qemu.git/commitdiff
virtio: make virtqueue_alloc_element static
authorLadi Prosek <lprosek@redhat.com>
Thu, 3 Nov 2016 08:55:50 +0000 (09:55 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 15 Nov 2016 15:20:36 +0000 (17:20 +0200)
The function does not fully initialize the returned VirtQueueElement and should
be used only internally from the virtio module.

Signed-off-by: Ladi Prosek <lprosek@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/virtio/virtio.c
include/hw/virtio/virtio.h

index 3a76dc6b8fe4be3ec7c73301e7519a442f333e75..1df5f4e5b0e8eb9ab88a33820822cc41f304297b 100644 (file)
@@ -632,7 +632,7 @@ void virtqueue_map(VirtQueueElement *elem)
                         VIRTQUEUE_MAX_SIZE, 0);
 }
 
-void *virtqueue_alloc_element(size_t sz, unsigned out_num, unsigned in_num)
+static void *virtqueue_alloc_element(size_t sz, unsigned out_num, unsigned in_num)
 {
     VirtQueueElement *elem;
     size_t in_addr_ofs = QEMU_ALIGN_UP(sz, __alignof__(elem->in_addr[0]));
index 6a2f57c1f76be96ead0bc1896682e086f68550ba..f12a1a863577dbcd9490df31fa3535bfdbb0016c 100644 (file)
@@ -154,7 +154,6 @@ VirtQueue *virtio_add_queue(VirtIODevice *vdev, int queue_size,
 
 void virtio_del_queue(VirtIODevice *vdev, int n);
 
-void *virtqueue_alloc_element(size_t sz, unsigned out_num, unsigned in_num);
 void virtqueue_push(VirtQueue *vq, const VirtQueueElement *elem,
                     unsigned int len);
 void virtqueue_flush(VirtQueue *vq, unsigned int count);