From mboxrd@z Thu Jan 1 00:00:00 1970 From: "tip-bot for Paul E. McKenney" Subject: [tip:core/rcu] drivers/vhost: Remove now-redundant read_barrier_depends() Date: Wed, 3 Jan 2018 08:08:47 -0800 Message-ID: Reply-To: virtualization@lists.linux-foundation.org, paulmck@linux.vnet.ibm.com, tglx@linutronix.de, linux-kernel@vger.kernel.org, mst@redhat.com, hpa@zytor.com, netdev@vger.kernel.org, mingo@kernel.org, kvm@vger.kernel.org, jasowang@redhat.com Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: mst@redhat.com, tglx@linutronix.de, virtualization@lists.linux-foundation.org, paulmck@linux.vnet.ibm.com, kvm@vger.kernel.org, jasowang@redhat.com, netdev@vger.kernel.org, mingo@kernel.org, hpa@zytor.com To: linux-tip-commits@vger.kernel.org Return-path: Received: from terminus.zytor.com ([65.50.211.136]:51987 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752048AbeACQJ4 (ORCPT ); Wed, 3 Jan 2018 11:09:56 -0500 Content-Disposition: inline Sender: netdev-owner@vger.kernel.org List-ID: Commit-ID: 3a5db0b108e0a40f08c2bcff6a675dbf632b91e0 Gitweb: https://git.kernel.org/tip/3a5db0b108e0a40f08c2bcff6a675dbf632b91e0 Author: Paul E. McKenney AuthorDate: Mon, 27 Nov 2017 09:45:10 -0800 Committer: Paul E. McKenney CommitDate: Tue, 5 Dec 2017 11:57:55 -0800 drivers/vhost: Remove now-redundant read_barrier_depends() Because READ_ONCE() now implies read_barrier_depends(), the read_barrier_depends() in next_desc() is now redundant. This commit therefore removes it and the related comments. Signed-off-by: Paul E. McKenney Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Cc: Cc: --- drivers/vhost/vhost.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 33ac2b1..78b5940 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c @@ -1877,12 +1877,7 @@ static unsigned next_desc(struct vhost_virtqueue *vq, struct vring_desc *desc) return -1U; /* Check they're not leading us off end of descriptors. */ - next = vhost16_to_cpu(vq, desc->next); - /* Make sure compiler knows to grab that: we don't want it changing! */ - /* We will use the result as an index in an array, so most - * architectures only need a compiler barrier here. */ - read_barrier_depends(); - + next = vhost16_to_cpu(vq, READ_ONCE(desc->next)); return next; }