lkml.org 
[lkml]   [2010]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] virtio_blk.c: Add documentation for vring_enable_cb()
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


\
 
 \ /
  Last update: 2010-05-20 00:43    [W:0.081 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site