dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Deepak Singh Rawat <drawat@vmware.com>
To: "dri-devel@lists.freedesktop.org" <dri-devel@lists.freedesktop.org>
Cc: YueHaibing <yuehaibing@huawei.com>,
	Deepak Singh Rawat <drawat@vmware.com>,
	Linux-graphics-maintainer <Linux-graphics-maintainer@vmware.com>
Subject: [PATCH 02/11] drm/vmwgfx: Remove set but not used variable 'restart'
Date: Fri, 5 Apr 2019 18:40:28 +0000	[thread overview]
Message-ID: <20190405184024.4452-2-drawat@vmware.com> (raw)
In-Reply-To: <20190405184024.4452-1-drawat@vmware.com>

From: YueHaibing <yuehaibing@huawei.com>

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c: In function 'vmw_cmdbuf_work_func':
drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c:514:7: warning:
 variable 'restart' set but not used [-Wunused-but-set-variable]

It not used any more after commit dc366364c4ef ("drm/vmwgfx: Fix multiple
command buffer context use")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Deepak Rawat <drawat@vmware.com>
Signed-off-by: Deepak Rawat <drawat@vmware.com>
Fixes: dc366364c4ef ("drm/vmwgfx: Fix multiple command buffer context use")
---
 drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c b/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c
index 70dab55e7888..ed15655eacd2 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c
@@ -511,17 +511,14 @@ static void vmw_cmdbuf_work_func(struct work_struct *work)
 		container_of(work, struct vmw_cmdbuf_man, work);
 	struct vmw_cmdbuf_header *entry, *next;
 	uint32_t dummy;
-	bool restart[SVGA_CB_CONTEXT_MAX];
 	bool send_fence = false;
 	struct list_head restart_head[SVGA_CB_CONTEXT_MAX];
 	int i;
 	struct vmw_cmdbuf_context *ctx;
 	bool global_block = false;
 
-	for_each_cmdbuf_ctx(man, i, ctx) {
+	for_each_cmdbuf_ctx(man, i, ctx)
 		INIT_LIST_HEAD(&restart_head[i]);
-		restart[i] = false;
-	}
 
 	mutex_lock(&man->error_mutex);
 	spin_lock(&man->lock);
@@ -533,7 +530,6 @@ static void vmw_cmdbuf_work_func(struct work_struct *work)
 		const char *cmd_name;
 
 		list_del_init(&entry->list);
-		restart[entry->cb_context] = true;
 		global_block = true;
 
 		if (!vmw_cmd_describe(header, &error_cmd_size, &cmd_name)) {
-- 
2.17.1

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

  reply	other threads:[~2019-04-05 18:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-05 18:40 [PATCH 01/11] drm/vmwgfx: Be more restrictive when dirtying resources Deepak Singh Rawat
2019-04-05 18:40 ` Deepak Singh Rawat [this message]
2019-04-05 18:40 ` [PATCH 03/11] drm/vmwgfx: remove redundant unlikely annotation Deepak Singh Rawat
2019-04-05 18:40 ` [PATCH 04/11] drm/vmwgfx: Use preprocessor macro to get valid context node Deepak Singh Rawat
2019-04-05 18:40 ` [PATCH 05/11] drm/vmwgfx: Use preprocessor macro for cmd struct Deepak Singh Rawat
2019-04-05 18:40 ` [PATCH 06/11] drm/vmwgfx: Add a new define for vmwgfx user-space debugging Deepak Singh Rawat
2019-04-05 18:40 ` [PATCH 07/11] drm/vmwgfx: Print message when command verifier returns with error Deepak Singh Rawat
2019-04-05 18:40 ` [PATCH 08/11] drm/vmwgfx: Clean up some debug messages in vmwgfx_execbuf.c Deepak Singh Rawat
2019-04-05 18:40 ` [PATCH 09/11] drm/vmwgfx: Use VMW_DEBUG_USER for device command buffer errors Deepak Singh Rawat
2019-04-05 18:40 ` [PATCH 10/11] drm/vmwgfx: Fix formatting and spaces in vmwgfx_execbuf.c Deepak Singh Rawat
2019-04-05 18:40 ` [PATCH 11/11] drm/vmwgfx: Use preprocessor macro for FIFO allocation Deepak Singh Rawat

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=20190405184024.4452-2-drawat@vmware.com \
    --to=drawat@vmware.com \
    --cc=Linux-graphics-maintainer@vmware.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=yuehaibing@huawei.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 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).