[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v3 03/28] virtio: make virtqueue_alloc_element static
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL v3 03/28] virtio: make virtqueue_alloc_element static |
Date: |
Tue, 15 Nov 2016 21:20:58 +0200 |
From: Ladi Prosek <address@hidden>
The function does not fully initialize the returned VirtQueueElement and should
be used only internally from the virtio module.
Signed-off-by: Ladi Prosek <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
include/hw/virtio/virtio.h | 1 -
hw/virtio/virtio.c | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h
index 6a2f57c..f12a1a8 100644
--- a/include/hw/virtio/virtio.h
+++ b/include/hw/virtio/virtio.h
@@ -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);
diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
index 3a76dc6..1df5f4e 100644
--- a/hw/virtio/virtio.c
+++ b/hw/virtio/virtio.c
@@ -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]));
--
MST
- [Qemu-devel] [PULL v3 00/28] virtio, vhost, pc, pci: documentation, fixes and cleanups, Michael S. Tsirkin, 2016/11/15
- [Qemu-devel] [PULL v3 01/28] intel_iommu: fixing source id during IOTLB hash key calculation, Michael S. Tsirkin, 2016/11/15
- [Qemu-devel] [PULL v3 02/28] virtio: rename virtqueue_discard to virtqueue_unpop, Michael S. Tsirkin, 2016/11/15
- [Qemu-devel] [PULL v3 03/28] virtio: make virtqueue_alloc_element static,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL v3 04/28] virtio-crypto: tag as not hotpluggable and migration, Michael S. Tsirkin, 2016/11/15
- [Qemu-devel] [PULL v3 05/28] intel_iommu: fix several incorrect endianess and bit fields, Michael S. Tsirkin, 2016/11/15
- [Qemu-devel] [PULL v3 06/28] intel_iommu: fix incorrect assert, Michael S. Tsirkin, 2016/11/15
- [Qemu-devel] [PULL v3 07/28] acpi: fix DMAR device scope for IOAPIC, Michael S. Tsirkin, 2016/11/15
- [Qemu-devel] [PULL v3 08/28] virtio: allow per-device-class legacy features, Michael S. Tsirkin, 2016/11/15
- [Qemu-devel] [PULL v3 09/28] virtio-net: mark VIRTIO_NET_F_GSO as legacy, Michael S. Tsirkin, 2016/11/15
- [Qemu-devel] [PULL v3 10/28] vhost: migration blocker only if shared log is used, Michael S. Tsirkin, 2016/11/15
- [Qemu-devel] [PULL v3 11/28] qdev: hotplug: drop HotplugHandler.post_plug callback, Michael S. Tsirkin, 2016/11/15
- [Qemu-devel] [PULL v3 12/28] nvdimm acpi: drop the lock of fit buffer, Michael S. Tsirkin, 2016/11/15
- [Qemu-devel] [PULL v3 13/28] pc: memhp: move nvdimm hotplug out of memory hotplug, Michael S. Tsirkin, 2016/11/15