drm/virtio: annotate virtio_gpu_queue_ctrl_buffer_locked
authorMichael S. Tsirkin <mst@redhat.com>
Mon, 5 Dec 2016 20:39:30 +0000 (22:39 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 15 Dec 2016 04:59:17 +0000 (06:59 +0200)
virtio_gpu_queue_ctrl_buffer_locked is called with ctrlq.qlock taken, it
releases and acquires this lock.  This causes a sparse warning.  Add
appropriate annotations for sparse context checking.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/gpu/drm/virtio/virtgpu_vq.c

index abfc54a18f1af624645f9860147a75dd17c49284..43ea0dc957d29f35027a15505e74bd790a5e8655 100644 (file)
@@ -297,6 +297,8 @@ void virtio_gpu_dequeue_cursor_func(struct work_struct *work)
 
 static int virtio_gpu_queue_ctrl_buffer_locked(struct virtio_gpu_device *vgdev,
                                               struct virtio_gpu_vbuffer *vbuf)
+               __releases(&vgdev->ctrlq.qlock)
+               __acquires(&vgdev->ctrlq.qlock)
 {
        struct virtqueue *vq = vgdev->ctrlq.vq;
        struct scatterlist *sgs[3], vcmd, vout, vresp;