瀏覽代碼

drm/virtio: annotate virtio_gpu_queue_ctrl_buffer_locked

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>
Michael S. Tsirkin 8 年之前
父節點
當前提交
3373755a41
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      drivers/gpu/drm/virtio/virtgpu_vq.c

+ 2 - 0
drivers/gpu/drm/virtio/virtgpu_vq.c

@@ -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,
 static int virtio_gpu_queue_ctrl_buffer_locked(struct virtio_gpu_device *vgdev,
 					       struct virtio_gpu_vbuffer *vbuf)
 					       struct virtio_gpu_vbuffer *vbuf)
+		__releases(&vgdev->ctrlq.qlock)
+		__acquires(&vgdev->ctrlq.qlock)
 {
 {
 	struct virtqueue *vq = vgdev->ctrlq.vq;
 	struct virtqueue *vq = vgdev->ctrlq.vq;
 	struct scatterlist *sgs[3], vcmd, vout, vresp;
 	struct scatterlist *sgs[3], vcmd, vout, vresp;