diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2012-10-16 23:56:16 +1030 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2012-12-18 15:20:38 +1030 |
commit | de929b04450f2ec984c2febb1249d0e0f993d0a2 (patch) | |
tree | 8a0d4c995fc7b978f04681e538648214d4211b53 | |
parent | 4614e51cccca0eb42ff7b1b6383e2d07db42edc8 (diff) | |
download | op-kernel-dev-de929b04450f2ec984c2febb1249d0e0f993d0a2.zip op-kernel-dev-de929b04450f2ec984c2febb1249d0e0f993d0a2.tar.gz |
virtio: tools: make it clear that virtqueue_add_buf() no longer returns > 0
We simplified virtqueue_add_buf(), make it clear in the callers.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-rw-r--r-- | tools/virtio/virtio_test.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/virtio/virtio_test.c b/tools/virtio/virtio_test.c index e626fa5..a11028a 100644 --- a/tools/virtio/virtio_test.c +++ b/tools/virtio/virtio_test.c @@ -164,7 +164,7 @@ static void run_test(struct vdev_info *dev, struct vq_info *vq, r = virtqueue_add_buf(vq->vq, &sl, 1, 0, dev->buf + started, GFP_ATOMIC); - if (likely(r >= 0)) { + if (likely(r == 0)) { ++started; virtqueue_kick(vq->vq); } @@ -177,7 +177,7 @@ static void run_test(struct vdev_info *dev, struct vq_info *vq, r = 0; } - } while (r >= 0); + } while (r == 0); if (completed == completed_before) ++spurious; assert(completed <= bufs); |