Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp184549imj; Thu, 14 Feb 2019 18:11:38 -0800 (PST) X-Google-Smtp-Source: AHgI3IZF1hlE25W/jVHnZU+V9YTEo9MpEDYje49jl0g5bhSkYwc1wCISsnRuaHd/FW+rQhrBKdJ4 X-Received: by 2002:a17:902:bd0a:: with SMTP id p10mr7355913pls.322.1550196698252; Thu, 14 Feb 2019 18:11:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550196698; cv=none; d=google.com; s=arc-20160816; b=lcQXpFNM+X/mXvJ6pGXTfj49jbCsl5kFv/rFZ+LDHfnW/s1yhLbk+vNlRwbunB5xYh wrnvKltWO+glzp3NAMccmIqGXohKX01xzX3CwlMq6s2YPA0/cQfiu0igVtzU7X80ZWx8 UBvIg7MfCHU5C80nnSJCtPnambrqWCRWitCuxRRVBYDsTxdn5Rcjq8A0IT/Q5S9ZqWMM +mf7c/pISV/pr3rU4l8j2/HXpIO1CFz0BNUw/D08/FXiijeJSA2PxplXbfURAxfH8gOh cVYBgahGn+hSGfFLkOk4huJQOs3DFiuNGnGBvHc3rb8+XBwFUTQyt0UxG9v8ncfBsuyS OBXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=kxllQaJfKSeRrSzsmFGRHnvHK2FJfYDE2zE1wW1l9wA=; b=ggm2eB9/s89Q9CUKbOQ6bhQ2N0dojMGCcybRhrAAKRwssG6EbEPKXRlrrqVUDPk2uP uRDRa/8VZeUctc7erMZD7liFeNXV17SEvJDrrmAiidRAg8Ikzidp9L+EZhgG9UsrFpcB n8PgE1+K679O1eW8N2BnMxeAkdGozcDASGTOTMKkUd56d0sNBrtgAGN7W9LNDUUuHUEt NmxzBywdoTlYJb417hYeOqEx9lUKdeyFo/tfsikkfSEgyr0tBEvwLY4DGyJX5J3X2TBY pzOsbpn3j4euMkDw6mf9N6TaMz0L59bnyHyrXs3Whw4WqvF1Dgt+Rb3HSVNkPFh4q/KP YZKA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vmware.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p8si4043450pls.83.2019.02.14.18.11.22; Thu, 14 Feb 2019 18:11:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vmware.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2439890AbfBNT6I (ORCPT + 99 others); Thu, 14 Feb 2019 14:58:08 -0500 Received: from ex13-edg-ou-002.vmware.com ([208.91.0.190]:11695 "EHLO EX13-EDG-OU-002.vmware.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728119AbfBNT6I (ORCPT ); Thu, 14 Feb 2019 14:58:08 -0500 Received: from sc9-mailhost3.vmware.com (10.113.161.73) by EX13-EDG-OU-002.vmware.com (10.113.208.156) with Microsoft SMTP Server id 15.0.1156.6; Thu, 14 Feb 2019 11:58:04 -0800 Received: from promb-2n-dhcp77.eng.vmware.com (promb-2n-dhcp77.eng.vmware.com [10.20.88.77]) by sc9-mailhost3.vmware.com (Postfix) with ESMTP id AE58541027; Thu, 14 Feb 2019 11:58:06 -0800 (PST) Message-ID: <2b3f7531e6bf4a2d9b6fdd1af07c6400712b3127.camel@vmware.com> Subject: Re: [PATCH -next] drm/vmwgfx: Remove set but not used variable 'restart' From: Deepak Singh Rawat To: YueHaibing , VMware Graphics , Thomas Hellstrom , David Airlie , Daniel Vetter CC: , , Date: Thu, 14 Feb 2019 11:58:37 -0800 In-Reply-To: <20190214020804.22935-1-yuehaibing@huawei.com> References: <20190214020804.22935-1-yuehaibing@huawei.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Received-SPF: None (EX13-EDG-OU-002.vmware.com: drawat@vmware.com does not designate permitted sender hosts) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thanks for doing this. Will include this one with next vmwgfx pull request. Reviewed-by: Deepak Rawat On Thu, 2019-02-14 at 02:08 +0000, YueHaibing wrote: > 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 > --- > 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)) { > > >