mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jes.Sorensen@redhat.com
To: rusty@rustcorp.com.au
Cc: mst@redhat.com, linux-kernel@vger.kernel.org,
	Jes Sorensen <Jes.Sorensen@redhat.com>
Subject: [PATCH] virtio_blk.c: Add documentation for vring_enable_cb()
Date: Wed, 19 May 2010 17:50:49 +0200	[thread overview]
Message-ID: <1274284249-29398-2-git-send-email-Jes.Sorensen@redhat.com> (raw)
In-Reply-To: <1274284249-29398-1-git-send-email-Jes.Sorensen@redhat.com>

From: Jes Sorensen <Jes.Sorensen@redhat.com>

Add documentation for vring_enable_cb() as return logic may not be
obvious for the caller.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.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


  reply	other threads:[~2010-05-19 15:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-19 15:50 Jes.Sorensen
2010-05-19 15:50 ` Jes.Sorensen [this message]
2010-05-19 22:37   ` Michael S. Tsirkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1274284249-29398-2-git-send-email-Jes.Sorensen@redhat.com \
    --to=jes.sorensen@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=rusty@rustcorp.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®