]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/virtio: Remove set but not used variable 'bo'
authorYueHaibing <yuehaibing@huawei.com>
Fri, 7 Sep 2018 02:03:57 +0000 (02:03 +0000)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 10 Sep 2018 05:10:36 +0000 (07:10 +0200)
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/virtio/virtgpu_display.c: In function 'virtio_gpu_framebuffer_init':
drivers/gpu/drm/virtio/virtgpu_display.c:78:28: warning:
 variable 'bo' set but not used [-Wunused-but-set-variable]
  struct virtio_gpu_object *bo;
                            ^

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1536285837-150460-1-git-send-email-yuehaibing@huawei.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
drivers/gpu/drm/virtio/virtgpu_display.c

index 9f1e0a669d4c0a2ad07438472c03d806bbbb3bee..0379d68976594b9f9aec084fc80e54da7224e669 100644 (file)
@@ -75,12 +75,9 @@ virtio_gpu_framebuffer_init(struct drm_device *dev,
                            struct drm_gem_object *obj)
 {
        int ret;
-       struct virtio_gpu_object *bo;
 
        vgfb->base.obj[0] = obj;
 
-       bo = gem_to_virtio_gpu_obj(obj);
-
        drm_helper_mode_fill_fb_struct(dev, &vgfb->base, mode_cmd);
 
        ret = drm_framebuffer_init(dev, &vgfb->base, &virtio_gpu_fb_funcs);