]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/virtio: remove set but not used variable 'vgdev'
authorYueHaibing <yuehaibing@huawei.com>
Mon, 25 Mar 2019 09:26:31 +0000 (09:26 +0000)
committerGerd Hoffmann <kraxel@redhat.com>
Thu, 28 Mar 2019 11:11:47 +0000 (12:11 +0100)
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/virtio/virtgpu_ttm.c: In function 'virtio_gpu_init_mem_type':
drivers/gpu/drm/virtio/virtgpu_ttm.c:117:28: warning:
 variable 'vgdev' set but not used [-Wunused-but-set-variable]

drivers/gpu/drm/virtio/virtgpu_ttm.c: In function 'virtio_gpu_bo_swap_notify':
drivers/gpu/drm/virtio/virtgpu_ttm.c:300:28: warning:
 variable 'vgdev' set but not used [-Wunused-but-set-variable]

It is never used since introduction in dc5698e80cf7 ("Add virtio gpu driver.")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
Link: http://patchwork.freedesktop.org/patch/msgid/20190325092631.152060-1-yuehaibing@huawei.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
drivers/gpu/drm/virtio/virtgpu_ttm.c

index 4bfbf25fabff8091cab1518f5fc4302a0e4dfd56..fcc571d13c3dbc986bfabb4bf99110b744ea2372 100644 (file)
@@ -116,10 +116,6 @@ static const struct ttm_mem_type_manager_func virtio_gpu_bo_manager_func = {
 static int virtio_gpu_init_mem_type(struct ttm_bo_device *bdev, uint32_t type,
                                    struct ttm_mem_type_manager *man)
 {
-       struct virtio_gpu_device *vgdev;
-
-       vgdev = virtio_gpu_get_vgdev(bdev);
-
        switch (type) {
        case TTM_PL_SYSTEM:
                /* System memory */
@@ -299,10 +295,8 @@ static void virtio_gpu_bo_move_notify(struct ttm_buffer_object *tbo,
 static void virtio_gpu_bo_swap_notify(struct ttm_buffer_object *tbo)
 {
        struct virtio_gpu_object *bo;
-       struct virtio_gpu_device *vgdev;
 
        bo = container_of(tbo, struct virtio_gpu_object, tbo);
-       vgdev = (struct virtio_gpu_device *)bo->gem_base.dev->dev_private;
 
        if (bo->pages)
                virtio_gpu_object_free_sg_table(bo);