[-next] drm/vmwgfx: Remove set but not used variable 'srf'

Submitted by YueHaibing on Jan. 16, 2019, 1:55 a.m.

Details

Message ID 1547603735-148124-1-git-send-email-yuehaibing@huawei.com
State New
Headers show
Series "drm/vmwgfx: Remove set but not used variable 'srf'" ( rev: 1 ) in DRI devel

Not browsing as part of any series.

Commit Message

YueHaibing Jan. 16, 2019, 1:55 a.m.
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/vmwgfx/vmwgfx_surface.c: In function 'vmw_hw_surface_destroy':
drivers/gpu/drm/vmwgfx/vmwgfx_surface.c:335:22: warning:
 variable 'srf' set but not used [-Wunused-but-set-variable]

It never used since commit 543831cfc976 ("drm/vmwgfx: Break out surface and
context management to separate files")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 2 --
 1 file changed, 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c b/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c
index 80a01cd..3b6976e 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c
@@ -332,7 +332,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) {
@@ -359,7 +358,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);
 	}