Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1008111ybt; Fri, 19 Jun 2020 21:26:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz2bcJQeBXi3W7U+Ab+Nh7iqHbL83NzSIPK6fj7yn+jSkhie6ILhkl7kedWz8igDG05DExZ X-Received: by 2002:a05:6402:1247:: with SMTP id l7mr6224819edw.61.1592627186772; Fri, 19 Jun 2020 21:26:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592627186; cv=none; d=google.com; s=arc-20160816; b=ewyfE6PWSvEIV2snPtxOTb1Azglc+P3XNL5JAvf4lKvmspLXZuxngofHtIvnn6lXzW 6RMyvjk3xrxaiC3XI09EjUEXwS+HGHEMe7W7yopYcNkpEIJ4PJpTA0BgkJewvxW8nyq3 HmdgKXIKydJu5nN8u67oB7hZnjfIr+kd3vuBRl9yDFjrr7HNR4FI+PjRA8N3ffLUNcE6 nzduvqD8DqHf+70RRe8yRwJcwqEi0ONAc7y6Apl88/V56zhXtPNX5H4LylD7h9GwY+xW W5UzchZfnq7sZLTP8MNcZb6tboY2cdn2bL0upD9a0VSZ9SiPnWZzQAgMHrxRqodWwE57 hjLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=TtSatW4fx1QmInWApX4FeSfqG2/RwS871fY7cs8kwpU=; b=D8YELf45HhpSozrjj7hNDAnsTyKrp++8PX8jeTx9kTJDMBHUzx4E4RjYAxaTyyPUyS E71Y9u/Wl2jt7YuFCGVetSQzyIEdIyZg4/VV/j+UCs7EvOcgjIut1qBSxyIjQSLX1ql4 2wHCZuaMSBeddtty0ZQdCyXoxIC9giWGM2lQG73moXWhHXCmNvUYzzinuKrM+JMsCR+z oYCGU9/u8pVxsLqOYbI2hMg3BE80xNxha3DoyMVktkhnEpnnBOMMjnB8F5BjpyeZZc6h dCDsQ2GwyaRo317ZhZGUFIWjgkj2hdiDkWbn8h9mVzRsZeZBtw4NQTA/1F6h2fHgJ3cu BAig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=HZQ86KNE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u1si4505131ejg.49.2020.06.19.21.26.05; Fri, 19 Jun 2020 21:26:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=HZQ86KNE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732816AbgFSSY5 (ORCPT + 99 others); Fri, 19 Jun 2020 14:24:57 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:33596 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2395061AbgFSSX1 (ORCPT ); Fri, 19 Jun 2020 14:23:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1592591005; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TtSatW4fx1QmInWApX4FeSfqG2/RwS871fY7cs8kwpU=; b=HZQ86KNEc7Tta5DHcbsUA990sn/BXn4wSuMz8kbBI0q+sgG2sfULmYS2cLbESMGu9c8dsR NuN9s26NjoNuNxyFJJnLHGgcMBIIl1pQoCfKgK6TFiwDHl0vAhWJptRbynqR0egDRpPFMc aiqV0M32VMUxwXRKz2GUa7Yypg7X1vc= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-48-NC5tv3sAPp2arDDP1jaJYg-1; Fri, 19 Jun 2020 14:23:23 -0400 X-MC-Unique: NC5tv3sAPp2arDDP1jaJYg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5AE79107ACCD; Fri, 19 Jun 2020 18:23:22 +0000 (UTC) Received: from eperezma.remote.csb (ovpn-113-14.ams2.redhat.com [10.36.113.14]) by smtp.corp.redhat.com (Postfix) with ESMTP id 68F651C8; Fri, 19 Jun 2020 18:23:20 +0000 (UTC) From: =?UTF-8?q?Eugenio=20P=C3=A9rez?= To: mst@redhat.com Cc: kvm list , Stefano Garzarella , virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Stefan Hajnoczi , Jason Wang Subject: [RFC v9 04/11] vhost: reorder functions Date: Fri, 19 Jun 2020 20:22:55 +0200 Message-Id: <20200619182302.850-5-eperezma@redhat.com> In-Reply-To: <20200619182302.850-1-eperezma@redhat.com> References: <20200619182302.850-1-eperezma@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: "Michael S. Tsirkin" Reorder functions in the file to not rely on forward declarations, in preparation to making them static down the road. Signed-off-by: Michael S. Tsirkin Signed-off-by: Eugenio PĂ©rez --- drivers/vhost/vhost.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 13021d6986eb..ba8da8785ede 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c @@ -2424,19 +2424,6 @@ void vhost_discard_vq_desc(struct vhost_virtqueue *vq, int n) } EXPORT_SYMBOL_GPL(vhost_discard_vq_desc); -/* After we've used one of their buffers, we tell them about it. We'll then - * want to notify the guest, using eventfd. */ -int vhost_add_used(struct vhost_virtqueue *vq, unsigned int head, int len) -{ - struct vring_used_elem heads = { - cpu_to_vhost32(vq, head), - cpu_to_vhost32(vq, len) - }; - - return vhost_add_used_n(vq, &heads, 1); -} -EXPORT_SYMBOL_GPL(vhost_add_used); - static int __vhost_add_used_n(struct vhost_virtqueue *vq, struct vring_used_elem *heads, unsigned count) @@ -2506,6 +2493,19 @@ int vhost_add_used_n(struct vhost_virtqueue *vq, struct vring_used_elem *heads, } EXPORT_SYMBOL_GPL(vhost_add_used_n); +/* After we've used one of their buffers, we tell them about it. We'll then + * want to notify the guest, using eventfd. */ +int vhost_add_used(struct vhost_virtqueue *vq, unsigned int head, int len) +{ + struct vring_used_elem heads = { + cpu_to_vhost32(vq, head), + cpu_to_vhost32(vq, len) + }; + + return vhost_add_used_n(vq, &heads, 1); +} +EXPORT_SYMBOL_GPL(vhost_add_used); + static bool vhost_notify(struct vhost_dev *dev, struct vhost_virtqueue *vq) { __u16 old, new; -- 2.18.1