Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1233764ybg; Thu, 11 Jun 2020 04:41:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwQq0RG0XnL5zpGD50woo5USq2jRULoZmw+qcvHMxxyhVMsQ4QQ3tziOeLQyVWxoeXeaMsf X-Received: by 2002:a17:906:8387:: with SMTP id p7mr7688369ejx.323.1591875665018; Thu, 11 Jun 2020 04:41:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591875665; cv=none; d=google.com; s=arc-20160816; b=iTRvCoAUyZsY+dWjzZgCY+2HtwhWKCZvYFH43fRnRMHjTyWLQ4petwHTrmz7LJrgJf ZPANGVTSz9MYA+GFE3c4RSmSgyFmwKGmm6W0/Dh1sVlJOBjTUAAtDsRl5m5LCbU4yagS 9dd2CrLJEbVxXxq6rYRRmdrupLCLmFhRAHKrpWGoi60skHWQAC7cMHQriKTEONlZvqAt dVKRXEHpdW8ZdixMbownr3/gHZjZRox7uLvcJjAc1oVt2R1iRC8TB14vxKU0JdeI1URF KItsM/b4XUvvSD7GkwF4c4TiuS88BAljJ1VTmMgjqDOcyv4uShfCTiV5AuwyVEKLi+hA 51gQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=GQeTVzMxKn8MhUVbsXHw7bWDPyusaDacrq6kngKNb/s=; b=QTdMiAEWkrRXUk8RIQIiA0cFqAH8JkE2IlnxcyOur8KkybsXLI761DR6E5VheRFznn DgWdONIytJJr95DEE3iaUerTGCmR0rqmFjD+wUL88CvaMTJkLd7otpVrM8VWQ5N2olFB PbRpV4tQKug/0EJMQ7HMD8J33vYg9X1qUPNOCy5695buiCugeK6+dwmB6gUZtLQQJwej 5XrXLRaNL06Dvt7ZM6NpNC+8nHGVpnQuulh9w+lBCrCT4oIwmzLx7nwrYmyDg9mdFCke vtgFsEc5LofHG1yYzf8x+4cNauwnY5gyLuc8mlcYm8AiuBk47K4LNdjfusAtb0EPZMGy c1rQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=IAyFciqI; 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 b10si1554472edr.286.2020.06.11.04.40.42; Thu, 11 Jun 2020 04:41:05 -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=IAyFciqI; 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 S1728193AbgFKLfu (ORCPT + 99 others); Thu, 11 Jun 2020 07:35:50 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:21294 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728009AbgFKLec (ORCPT ); Thu, 11 Jun 2020 07:34:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591875271; 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: in-reply-to:in-reply-to:references:references; bh=GQeTVzMxKn8MhUVbsXHw7bWDPyusaDacrq6kngKNb/s=; b=IAyFciqIRCFT+Y3sxrzN1KnvSNsYLnLT7N2IxGhqVOvH0CzMUFbrkg6pq+cc1IpArMFfEe 3YH5Tlale4b2YVIJk6LUoDJkv7WB+06v3HMDZOSbCvqNcMd7AdID9Kg2E0nDAEZFkaBpR3 feGdD/piN3RsNRzluX+wH82lRueRzQs= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-95-GOhMdGAMP7O6LeZpHXd62A-1; Thu, 11 Jun 2020 07:34:27 -0400 X-MC-Unique: GOhMdGAMP7O6LeZpHXd62A-1 Received: by mail-wr1-f70.google.com with SMTP id p9so2458551wrx.10 for ; Thu, 11 Jun 2020 04:34:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=GQeTVzMxKn8MhUVbsXHw7bWDPyusaDacrq6kngKNb/s=; b=pTydj0qBaKLpIryl2itmDOYVODfk42bOl5WideJpxuydC049gD+/1vH/koaAQGkJy2 voUMSZ2fcXdlcvlAQsuMiWRk7KFPIQ+O6j613m41ho2RM8bfPRkw9ifbH3PFc1wmnrUt SUSj7KncfuzA8ZEB+MXva5NYmKSovgv+/bI2+qzlVMlMJ+rnpM2qtQYuDgHe12J/kgNz g+mjQdmKATJsuaFIJnCxaT8AGC2CO/XzfcmIUl76wCoZzed19SieEAqC6g6CZmbqlTga +/9CQoSjUIC8QLbMaasAp/TezNF3khxMj6J57ojCah2KPK/kE5FSAoEYQRT8rNeHS2tH aN/A== X-Gm-Message-State: AOAM532807+pYiaaUAaa2g35g9A+UxivUa/cwMlPVdxgu7DUI4Ii5lyd ouCzAGZ8r8KFhfYnv5zq17BnXda2OhC4enP/z7zwhyp6Tb0lKMcUDFNJxoLdO6JZbHdbra9K43S MqIkZejnR0brA4WYj6DCvextI X-Received: by 2002:adf:f450:: with SMTP id f16mr9149829wrp.307.1591875266440; Thu, 11 Jun 2020 04:34:26 -0700 (PDT) X-Received: by 2002:adf:f450:: with SMTP id f16mr9149807wrp.307.1591875266209; Thu, 11 Jun 2020 04:34:26 -0700 (PDT) Received: from redhat.com (bzq-79-181-55-232.red.bezeqint.net. [79.181.55.232]) by smtp.gmail.com with ESMTPSA id w3sm4155571wmg.44.2020.06.11.04.34.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jun 2020 04:34:25 -0700 (PDT) Date: Thu, 11 Jun 2020 07:34:24 -0400 From: "Michael S. Tsirkin" To: linux-kernel@vger.kernel.org Cc: kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, Jason Wang , eperezma@redhat.com Subject: [PATCH RFC v8 04/11] vhost: reorder functions Message-ID: <20200611113404.17810-5-mst@redhat.com> References: <20200611113404.17810-1-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200611113404.17810-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 dfcdb36d4227..c38605b01080 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c @@ -2425,19 +2425,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) @@ -2507,6 +2494,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; -- MST