From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S941168AbcKODVz (ORCPT ); Mon, 14 Nov 2016 22:21:55 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39598 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933258AbcKODVy (ORCPT ); Mon, 14 Nov 2016 22:21:54 -0500 Subject: Re: [PATCH] virtio_ring: fix description of virtqueue_get_buf To: Felipe Franciosi , "Michael S. Tsirkin" References: <1479132975-8517-1-git-send-email-felipe@nutanix.com> Cc: virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org From: Jason Wang Message-ID: <276972d5-ee01-9c4a-d3cc-0db4d0dd2b7b@redhat.com> Date: Tue, 15 Nov 2016 11:21:48 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <1479132975-8517-1-git-send-email-felipe@nutanix.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Tue, 15 Nov 2016 03:21:53 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2016年11月14日 22:16, Felipe Franciosi wrote: > The device (not the driver) populates the used ring and includes the len > of how much data was written. > > Signed-off-by: Felipe Franciosi > --- > drivers/virtio/virtio_ring.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c > index 489bfc6..8a0d6a9 100644 > --- a/drivers/virtio/virtio_ring.c > +++ b/drivers/virtio/virtio_ring.c > @@ -649,7 +649,7 @@ static inline bool more_used(const struct vring_virtqueue *vq) > * @vq: the struct virtqueue we're talking about. > * @len: the length written into the buffer > * > - * If the driver wrote data into the buffer, @len will be set to the > + * If the device wrote data into the buffer, @len will be set to the > * amount written. This means you don't need to clear the buffer > * beforehand to ensure there's no data leakage in the case of short > * writes. Reviewed-by: Jason Wang