tools/virtio: switch to __ptr_ring_empty
authorMichael S. Tsirkin <mst@redhat.com>
Thu, 25 Jan 2018 23:36:39 +0000 (01:36 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 29 Jan 2018 17:02:54 +0000 (12:02 -0500)
We don't rely on lockless guarantees, but it
seems cleaner than inverting __ptr_ring_peek.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/virtio/ringtest/ptr_ring.c

index e6e81305ef469559ffde4013535be10019c30da4..477899c12c5138d8c5d334946eb6fd17af56e09c 100644 (file)
@@ -187,7 +187,7 @@ bool enable_kick()
 
 bool avail_empty()
 {
-       return !__ptr_ring_peek(&array);
+       return __ptr_ring_empty(&array);
 }
 
 bool use_buf(unsigned *lenp, void **bufp)