]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/vmwgfx: remove set but not used variable 'srf'
authorYueHaibing <yuehaibing@huawei.com>
Fri, 1 Nov 2019 13:46:11 +0000 (21:46 +0800)
committerThomas Hellstrom <thellstrom@vmware.com>
Thu, 14 Nov 2019 07:41:36 +0000 (08:41 +0100)
drivers/gpu/drm/vmwgfx/vmwgfx_surface.c:339:22:
 warning: variable srf set but not used [-Wunused-but-set-variable]

'srf' is never used, so can be removed.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
drivers/gpu/drm/vmwgfx/vmwgfx_surface.c

index 29d8794f0421bc642538a28f4c1a652a0de7d0a9..de0530b4dc1bf51590d455ed4f49812312c4f0c0 100644 (file)
@@ -336,7 +336,6 @@ static void vmw_hw_surface_destroy(struct vmw_resource *res)
 {
 
        struct vmw_private *dev_priv = res->dev_priv;
-       struct vmw_surface *srf;
        void *cmd;
 
        if (res->func->destroy == vmw_gb_surface_destroy) {
@@ -360,7 +359,6 @@ static void vmw_hw_surface_destroy(struct vmw_resource *res)
                 */
 
                mutex_lock(&dev_priv->cmdbuf_mutex);
-               srf = vmw_res_to_srf(res);
                dev_priv->used_memory_size -= res->backup_size;
                mutex_unlock(&dev_priv->cmdbuf_mutex);
        }