[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1274284249-29398-2-git-send-email-Jes.Sorensen@redhat.com>
Date: Wed, 19 May 2010 17:50:49 +0200
From: Jes.Sorensen@...hat.com
To: rusty@...tcorp.com.au
Cc: mst@...hat.com, linux-kernel@...r.kernel.org,
Jes Sorensen <Jes.Sorensen@...hat.com>
Subject: [PATCH] virtio_blk.c: Add documentation for vring_enable_cb()
From: Jes Sorensen <Jes.Sorensen@...hat.com>
Add documentation for vring_enable_cb() as return logic may not be
obvious for the caller.
Signed-off-by: Jes Sorensen <Jes.Sorensen@...hat.com>
---
drivers/virtio/virtio_ring.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index 0f90634..2cdcdca 100644
--- a/drivers/virtio/virtio_ring.c
+++ b/drivers/virtio/virtio_ring.c
@@ -333,6 +333,11 @@ static void vring_disable_cb(struct virtqueue *_vq)
vq->vring.avail->flags |= VRING_AVAIL_F_NO_INTERRUPT;
}
+/*
+ * Enable interrupts and check whether there is anything in the queue.
+ * Note, vring_enable_cb() returns TRUE if the queue is empty, and
+ * FALSE if the queue is not empty and there is work to do.
+ */
static bool vring_enable_cb(struct virtqueue *_vq)
{
struct vring_virtqueue *vq = to_vvq(_vq);
--
1.6.5.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists