From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51256) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c2DoW-0001yF-Nw for qemu-devel@nongnu.org; Thu, 03 Nov 2016 04:56:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c2DoV-0005AY-6n for qemu-devel@nongnu.org; Thu, 03 Nov 2016 04:56:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57740) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c2DoV-0005AQ-18 for qemu-devel@nongnu.org; Thu, 03 Nov 2016 04:55:59 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3C1DA80F9F for ; Thu, 3 Nov 2016 08:55:58 +0000 (UTC) From: Ladi Prosek Date: Thu, 3 Nov 2016 09:55:50 +0100 Message-Id: <1478163350-17339-3-git-send-email-lprosek@redhat.com> In-Reply-To: <1478163350-17339-1-git-send-email-lprosek@redhat.com> References: <1478163350-17339-1-git-send-email-lprosek@redhat.com> Subject: [Qemu-devel] [PATCH v2 2/2] virtio: make virtqueue_alloc_element static List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, mst@redhat.com The function does not fully initialize the returned VirtQueueElement and should be used only internally from the virtio module. Signed-off-by: Ladi Prosek --- hw/virtio/virtio.c | 2 +- include/hw/virtio/virtio.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index 68971fd..2471722 100644 --- a/hw/virtio/virtio.c +++ b/hw/virtio/virtio.c @@ -633,7 +633,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])); diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h index 95adaca..0deafb7 100644 --- a/include/hw/virtio/virtio.h +++ b/include/hw/virtio/virtio.h @@ -151,7 +151,6 @@ VirtQueue *virtio_add_queue_aio(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); -- 2.5.5