All of lore.kernel.org
 help / color / mirror / Atom feed
From: zhengbin <zhengbin13@huawei.com>
To: linux-graphics-maintainer@vmware.com, thellstrom@vmware.com,
	airlied@linux.ie, daniel@ffwll.ch,
	dri-devel@lists.freedesktop.org
Cc: zhengbin13@huawei.com
Subject: [PATCH] drm/vmwgfx: remove set but not used variable 'srf'
Date: Thu, 31 Oct 2019 21:41:24 +0800	[thread overview]
Message-ID: <1572529284-88089-1-git-send-email-zhengbin13@huawei.com> (raw)

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 is introduced by commit 543831cfc976 ("drm/vmwgfx:
Break out surface and context management to separate files"),
but never used, so remove it.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@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

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

WARNING: multiple messages have this Message-ID (diff)
From: zhengbin <zhengbin13@huawei.com>
To: <linux-graphics-maintainer@vmware.com>, <thellstrom@vmware.com>,
	<airlied@linux.ie>, <daniel@ffwll.ch>,
	<dri-devel@lists.freedesktop.org>
Cc: zhengbin13@huawei.com
Subject: [PATCH] drm/vmwgfx: remove set but not used variable 'srf'
Date: Thu, 31 Oct 2019 21:41:24 +0800	[thread overview]
Message-ID: <1572529284-88089-1-git-send-email-zhengbin13@huawei.com> (raw)
Message-ID: <20191031134124.Lmy5CCJGzYAu7gGf990401hb4GG0Pid--bAggw2mnS8@z> (raw)

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 is introduced by commit 543831cfc976 ("drm/vmwgfx:
Break out surface and context management to separate files"),
but never used, so remove it.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@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

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

             reply	other threads:[~2019-10-31 13:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-31 13:41 zhengbin [this message]
2019-10-31 13:41 ` [PATCH] drm/vmwgfx: remove set but not used variable 'srf' zhengbin
2019-11-13  3:08 ` zhengbin (A)
2019-11-13  3:08   ` zhengbin (A)
2019-11-13  9:51 [PATCH] drm/vmwgfx: Use dma-coherent memory for high-bandwidth port messaging Thomas Hellström (VMware)
2019-11-13  9:51 ` [PATCH] drm/vmwgfx: remove set but not used variable 'srf' Thomas Hellström (VMware)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1572529284-88089-1-git-send-email-zhengbin13@huawei.com \
    --to=zhengbin13@huawei.com \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-graphics-maintainer@vmware.com \
    --cc=thellstrom@vmware.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.