From: Michael S. Tsirkin on
On Wed, May 19, 2010 at 05:50:49PM +0200, Jes.Sorensen(a)redhat.com wrote:
> From: Jes Sorensen <Jes.Sorensen(a)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(a)redhat.com>

Yes. Confused me too.
Acked-by: Michael S. Tsirkin <mst(a)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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/