From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39114) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aVLwu-0008FD-J8 for qemu-devel@nongnu.org; Mon, 15 Feb 2016 11:24:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aVLwr-0001HR-5N for qemu-devel@nongnu.org; Mon, 15 Feb 2016 11:24:32 -0500 Received: from e06smtp13.uk.ibm.com ([195.75.94.109]:49852) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aVLwq-0001HJ-Sb for qemu-devel@nongnu.org; Mon, 15 Feb 2016 11:24:29 -0500 Received: from localhost by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 15 Feb 2016 16:24:27 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id 04B43219005F for ; Mon, 15 Feb 2016 16:24:11 +0000 (GMT) Received: from d06av01.portsmouth.uk.ibm.com (d06av01.portsmouth.uk.ibm.com [9.149.37.212]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u1FGOPk466125996 for ; Mon, 15 Feb 2016 16:24:25 GMT Received: from d06av01.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av01.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u1FGOP09026072 for ; Mon, 15 Feb 2016 09:24:25 -0700 Date: Mon, 15 Feb 2016 17:24:24 +0100 From: Cornelia Huck Message-ID: <20160215172424.613e5e50.cornelia.huck@de.ibm.com> In-Reply-To: <1455470231-5223-3-git-send-email-pbonzini@redhat.com> References: <1455470231-5223-1-git-send-email-pbonzini@redhat.com> <1455470231-5223-3-git-send-email-pbonzini@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/8] vring: make vring_enable_notification return void List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org, stefanha@redhat.com, mst@redhat.com On Sun, 14 Feb 2016 18:17:05 +0100 Paolo Bonzini wrote: > Make the API more similar to the regular virtqueue API. This will > help when modifying the code to not use vring.c anymore. > > Signed-off-by: Paolo Bonzini > --- > hw/block/dataplane/virtio-blk.c | 3 ++- > hw/virtio/dataplane/vring.c | 3 +-- > include/hw/virtio/dataplane/vring.h | 2 +- > 3 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/hw/virtio/dataplane/vring.c b/hw/virtio/dataplane/vring.c > index 4308d9f..157e8b8 100644 > --- a/hw/virtio/dataplane/vring.c > +++ b/hw/virtio/dataplane/vring.c > @@ -175,7 +175,7 @@ void vring_disable_notification(VirtIODevice *vdev, Vring *vring) > * > * Return true if the vring is empty, false if there are more requests. > */ I realize that this is going away, but the comment above is now a bit irritating :) > -bool vring_enable_notification(VirtIODevice *vdev, Vring *vring) > +void vring_enable_notification(VirtIODevice *vdev, Vring *vring) > { > if (virtio_vdev_has_feature(vdev, VIRTIO_RING_F_EVENT_IDX)) { > vring_avail_event(&vring->vr) = vring->vr.avail->idx; > @@ -183,7 +183,6 @@ bool vring_enable_notification(VirtIODevice *vdev, Vring *vring) > vring_clear_used_flags(vdev, vring, VRING_USED_F_NO_NOTIFY); > } > smp_mb(); /* ensure update is seen before reading avail_idx */ > - return !vring_more_avail(vdev, vring); > } > > /* This is stolen from linux/drivers/vhost/vhost.c:vhost_notify() */ Otherwise Acked-by: Cornelia Huck