From patchwork Tue Oct 11 09:22:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ladi Prosek X-Patchwork-Id: 9370497 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id EC45260487 for ; Tue, 11 Oct 2016 11:08:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D683728EE0 for ; Tue, 11 Oct 2016 11:08:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CB53429A3B; Tue, 11 Oct 2016 11:08:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 71FE628EE0 for ; Tue, 11 Oct 2016 11:08:16 +0000 (UTC) Received: from localhost ([::1]:54567 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bttH1-0007WZ-CI for patchwork-qemu-devel@patchwork.kernel.org; Tue, 11 Oct 2016 05:22:59 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36858) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bttGR-0007Tg-RW for qemu-devel@nongnu.org; Tue, 11 Oct 2016 05:22:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bttGP-0006CP-RD for qemu-devel@nongnu.org; Tue, 11 Oct 2016 05:22:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58768) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bttGP-0006Bv-LB for qemu-devel@nongnu.org; Tue, 11 Oct 2016 05:22:21 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (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 3CF65C0528A7 for ; Tue, 11 Oct 2016 09:22:21 +0000 (UTC) Received: from dhcp-1-107.brq.redhat.com (ovpn-112-25.ams2.redhat.com [10.36.112.25]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u9B9MA7Q028269; Tue, 11 Oct 2016 05:22:18 -0400 From: Ladi Prosek To: qemu-devel@nongnu.org Date: Tue, 11 Oct 2016 11:22:04 +0200 Message-Id: <1476177724-28712-3-git-send-email-lprosek@redhat.com> In-Reply-To: <1476177724-28712-1-git-send-email-lprosek@redhat.com> References: <1476177724-28712-1-git-send-email-lprosek@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 11 Oct 2016 09:22:21 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 2/2] virtio: make virtqueue_alloc_element static X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: stefanha@redhat.com, mst@redhat.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 12cef6c..c0c3046 100644 --- a/hw/virtio/virtio.c +++ b/hw/virtio/virtio.c @@ -610,7 +610,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 5d12434..97df323 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);