From e92aa090fd0d2aca5f1551b53e29c5a0ad66c164 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Tue, 16 Oct 2012 23:56:16 +1030 Subject: [PATCH] --- yaml --- r: 347469 b: refs/heads/master c: de929b04450f2ec984c2febb1249d0e0f993d0a2 h: refs/heads/master i: 347467: c44dd6d94ce65c64ac26103564fc2e13afd03196 v: v3 --- [refs] | 2 +- trunk/tools/virtio/virtio_test.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 9c5da7377fc0..f10156e5008d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4614e51cccca0eb42ff7b1b6383e2d07db42edc8 +refs/heads/master: de929b04450f2ec984c2febb1249d0e0f993d0a2 diff --git a/trunk/tools/virtio/virtio_test.c b/trunk/tools/virtio/virtio_test.c index e626fa553c5a..a11028acf219 100644 --- a/trunk/tools/virtio/virtio_test.c +++ b/trunk/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);