drm/virtio: Make virtgpu_dmabuf_ops with static keyword
authorZou Wei <zou_wei@huawei.com>
Sat, 14 Nov 2020 07:16:13 +0000 (15:16 +0800)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 16 Nov 2020 07:53:23 +0000 (08:53 +0100)
Fix the following sparse warning:

./virtgpu_prime.c:46:33: warning: symbol 'virtgpu_dmabuf_ops' was not declared. Should it be static?

Signed-off-by: Zou Wei <zou_wei@huawei.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1605338173-22100-1-git-send-email-zou_wei@huawei.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
drivers/gpu/drm/virtio/virtgpu_prime.c

index 1ef1e2f2263332bd5eb0f61f01e46261bf8a3a41..807a27a163655fbeee7dfa5bec6cccd0221e6669 100644 (file)
@@ -43,7 +43,7 @@ static int virtgpu_virtio_get_uuid(struct dma_buf *buf,
        return 0;
 }
 
-const struct virtio_dma_buf_ops virtgpu_dmabuf_ops =  {
+static const struct virtio_dma_buf_ops virtgpu_dmabuf_ops =  {
        .ops = {
                .cache_sgt_mapping = true,
                .attach = virtio_dma_buf_attach,