Re: [PATCH] virtio_blk.c: Add documentation for vring_enable_cb()
From: Michael S. Tsirkin
Date: Wed May 19 2010 - 18:41:12 EST
On Wed, May 19, 2010 at 05:50:49PM +0200, Jes.Sorensen@xxxxxxxxxx wrote:
> From: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx>
>
> Add documentation for vring_enable_cb() as return logic may not be
> obvious for the caller.
>
> Signed-off-by: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx>
Yes. Confused me too.
Acked-by: Michael S. Tsirkin <mst@xxxxxxxxxx>
> ---
> 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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/