From: "Michael S. Tsirkin" <mst@redhat.com>
To: Jes.Sorensen@redhat.com
Cc: rusty@rustcorp.com.au, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] virtio_blk.c: Add documentation for vring_enable_cb()
Date: Thu, 20 May 2010 01:37:07 +0300 [thread overview]
Message-ID: <20100519223707.GD4111@redhat.com> (raw)
In-Reply-To: <1274284249-29398-2-git-send-email-Jes.Sorensen@redhat.com>
On Wed, May 19, 2010 at 05:50:49PM +0200, Jes.Sorensen@redhat.com wrote:
> 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>
Yes. Confused me too.
Acked-by: Michael S. Tsirkin <mst@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
prev parent reply other threads:[~2010-05-19 22:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-19 15:50 [PATCH] virtio_blk.c: Add documentation for vring_enable_cb() Jes.Sorensen
2010-05-19 15:50 ` Jes.Sorensen
2010-05-19 22:37 ` Michael S. Tsirkin [this message]
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=20100519223707.GD4111@redhat.com \
--to=mst@redhat.com \
--cc=Jes.Sorensen@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).