Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit de929b04 authored by Rusty Russell's avatar Rusty Russell
Browse files

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: default avatarRusty Russell <rusty@rustcorp.com.au>
parent 4614e51c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);