linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH -next] drm/vmwgfx: Remove set but not used variable 'srf'
       [not found] <1547603735-148124-1-git-send-email-yuehaibing@huawei.com>
@ 2019-01-16  5:35 ` Thomas Hellstrom
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Hellstrom @ 2019-01-16  5:35 UTC (permalink / raw)
  To: yuehaibing, Linux-graphics-maintainer, syeh, airlied
  Cc: dri-devel, linux-kernel, kernel-janitors

Yue,

Thanks,
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>

Will include in the next -next pull.
/Thomas


On Wed, 2019-01-16 at 01:55 +0000, YueHaibing wrote:
> 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(-)
> 
> 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);
>  	}
> 
> 
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH -next] drm/vmwgfx: remove set but not used variable 'srf'
@ 2019-11-01 13:46 YueHaibing
  0 siblings, 0 replies; 2+ messages in thread
From: YueHaibing @ 2019-11-01 13:46 UTC (permalink / raw)
  To: linux-graphics-maintainer, thellstrom, airlied, daniel
  Cc: dri-devel, linux-kernel, YueHaibing

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>
---
 drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c b/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c
index 29d8794..de0530b 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c
@@ -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);
 	}
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-11-01 13:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1547603735-148124-1-git-send-email-yuehaibing@huawei.com>
2019-01-16  5:35 ` [PATCH -next] drm/vmwgfx: Remove set but not used variable 'srf' Thomas Hellstrom
2019-11-01 13:46 [PATCH -next] drm/vmwgfx: remove " YueHaibing

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).