From patchwork Thu Aug 24 07:37:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 716501 Delivered-To: patches@linaro.org Received: by 2002:adf:f747:0:b0:317:ecd7:513f with SMTP id z7csp1199976wrp; Thu, 24 Aug 2023 00:39:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEJRGWromi8KKVLqlEGucm2oe02HFOB1uw0w0dN3Cv+qvwzY+acwfqksf0Es3ojqKq7F57g X-Received: by 2002:a05:622a:15c9:b0:3fd:ed14:6eb9 with SMTP id d9-20020a05622a15c900b003fded146eb9mr18659955qty.11.1692862741133; Thu, 24 Aug 2023 00:39:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692862741; cv=none; d=google.com; s=arc-20160816; b=TOLvPPehO4zPI6Brl/QeR7xhc46JrLm+Z+R3/OOwcIb+S+LAeTNM+JjfTPOzcbUax+ jtMMHjwKngQLuGAO6l30FnoT7hsiJPp471g0xuDUEkEz8mn/MyQyh1194C7PBRV9Y/4c 35nFYyFYJBWP4y8Cm0l6KK9ZRw1yVc7sxlQkyLql5RSbjRoPyNx9ixBLMlBoyFKhTXh/ D0CjyrjxI2NRwVGuIzBLgz2F+u2ZUpj1xX7nLC4Fj8PTBrWtx+qeCfaNAYh3BLIpgQD+ YGWj/ZEf+3BaJ/1ZOBnk/PVwCPQCLq6bpS257JwhFUqjzHaL77yJ8HNtf4arBqIIVL5D mTOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:list-unsubscribe:list-subscribe:list-post :list-owner:list-help:list-archive:archived-at:list-id:subject :precedence:cc:message-id-hash:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=yhAs5f1e9SslImYiV3E7XzD2hCSSOtp4h0+a9XMMb0w=; fh=PZhnOf25r3rAzb7WoIqSN2STzNLXg7dby3cHV/r3k4c=; b=DbQdGqzbrMKX5LY6UtY2V0pnL3wJARxj6gRLx7dQZwWI8aOBCIK3BtU93YXkPPayx3 gAdKqiM71BsNIOv6029Scg90L/rxssobmRP57FYa+y8BsRoshMn3xvawBYEDBxVNZsi1 ax8iZnOrs230W2whBr6M4PTpWxYCbthGlu9XwyvvUN1NBc+SwHP67ItnkZCUNs8dZKrR 75PbpoCjlDk4FwBdfBKTSkFe9RCN5JFEF0fzTcxzlzeJ87Tr0Yenq+60lAHueMe5JlKe cAbCuxejBYNNgn2AmvGSW2MJxTnuPtRiR5aNoIdPH26CJm2pn2iB9rnIHUR4eNLVtoaG +l5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@kernel.org header.s=k20201202 header.b=JvZadWCE; spf=pass (google.com: domain of linaro-mm-sig-bounces+patches=linaro.org@lists.linaro.org designates 3.208.193.21 as permitted sender) smtp.mailfrom="linaro-mm-sig-bounces+patches=linaro.org@lists.linaro.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lists.linaro.org (lists.linaro.org. [3.208.193.21]) by mx.google.com with ESMTPS id x15-20020a05622a000f00b0040fdea287c0si3217304qtw.476.2023.08.24.00.39.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Aug 2023 00:39:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linaro-mm-sig-bounces+patches=linaro.org@lists.linaro.org designates 3.208.193.21 as permitted sender) client-ip=3.208.193.21; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@kernel.org header.s=k20201202 header.b=JvZadWCE; spf=pass (google.com: domain of linaro-mm-sig-bounces+patches=linaro.org@lists.linaro.org designates 3.208.193.21 as permitted sender) smtp.mailfrom="linaro-mm-sig-bounces+patches=linaro.org@lists.linaro.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from lists.linaro.org (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id B8F5A3F637 for ; Thu, 24 Aug 2023 07:39:00 +0000 (UTC) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lists.linaro.org (Postfix) with ESMTPS id 776AE3F672 for ; Thu, 24 Aug 2023 07:38:19 +0000 (UTC) Authentication-Results: lists.linaro.org; dkim=pass header.d=kernel.org header.s=k20201202 header.b=JvZadWCE; spf=pass (lists.linaro.org: domain of lee@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=lee@kernel.org; dmarc=pass (policy=none) header.from=kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2276A65AF5; Thu, 24 Aug 2023 07:38:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 69CD6C433CA; Thu, 24 Aug 2023 07:38:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1692862698; bh=qTc11hboeB2aZlOqkN91NN/Dw5CZWbyrOr80wSzYNm4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JvZadWCEBYotqkspkGwfoN/lfsikJ/T6fYB+lxsBQ4+b/7xuDAS+euYAqFWJjjorV nJaf7bDOyNhZLRm3jEvgi+JdXdxxzS9roTINN1HfZo41vRV8EC4z/4GLmh1r3q/RAT gwV4hMG5CwA6dEYGxHZe7CV7AYsnuIf7L1K2fVUfHwsFcPxScxjf8LE9ya9ZtVuewB 7I8t1tgs8gXolFV3dApvgXNSvl5c9lqSMMkqraj0/2d3Werd/kFOz6G6cKvASlNYXe uJw42JOzUyihKE3BMX638v9Uw9GDCzksJVdFaGOIElhLbpHTxhaocarxF+4KPLuNti pOPqUkbedTifg== From: Lee Jones To: lee@kernel.org Date: Thu, 24 Aug 2023 08:37:03 +0100 Message-ID: <20230824073710.2677348-19-lee@kernel.org> X-Mailer: git-send-email 2.42.0.rc1.204.g551eb34607-goog In-Reply-To: <20230824073710.2677348-1-lee@kernel.org> References: <20230824073710.2677348-1-lee@kernel.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: 776AE3F672 X-Spamd-Bar: ------- X-Spamd-Result: default: False [-7.00 / 15.00]; REPLY(-4.00)[]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; DMARC_POLICY_ALLOW(-0.50)[kernel.org,none]; R_DKIM_ALLOW(-0.20)[kernel.org:s=k20201202]; R_SPF_ALLOW(-0.20)[+a:dfw.source.kernel.org:c]; MIME_GOOD(-0.10)[text/plain]; ASN(0.00)[asn:54825, ipnet:139.178.80.0/21, country:US]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_TWELVE(0.00)[13]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; RCVD_TLS_ALL(0.00)[]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; FREEMAIL_CC(0.00)[vger.kernel.org,linux.intel.com,kernel.org,suse.de,gmail.com,ffwll.ch,linaro.org,amd.com,redhat.com,lists.freedesktop.org,lists.linaro.org]; NEURAL_HAM(-0.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[kernel.org:+] X-Rspamd-Action: no action X-Rspamd-Server: lists.linaro.org Message-ID-Hash: 2TIMK5KNJAX5SIHOSXPGCBK3TUBKUFOC X-Message-ID-Hash: 2TIMK5KNJAX5SIHOSXPGCBK3TUBKUFOC X-MailFrom: lee@kernel.org X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation CC: linux-kernel@vger.kernel.org, Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Daniel Vetter , Sumit Semwal , =?utf-8?q?Christian_K=C3=B6nig?= , Danilo Krummrich , dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org, linaro-mm-sig@lists.linaro.org X-Mailman-Version: 3.3.5 Precedence: list Subject: [Linaro-mm-sig] [PATCH 18/20] drm/drm_gpuva_mgr: Remove set but unused variable 'prev' List-Id: "Unified memory management interest group." Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/drm_gpuva_mgr.c: In function ‘__drm_gpuva_sm_map’: drivers/gpu/drm/drm_gpuva_mgr.c:1079:39: warning: variable ‘prev’ set but not used [-Wunused-but-set-variable] Signed-off-by: Lee Jones --- Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: "Christian König" Cc: Danilo Krummrich Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org --- drivers/gpu/drm/drm_gpuva_mgr.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/drm_gpuva_mgr.c b/drivers/gpu/drm/drm_gpuva_mgr.c index f86bfad74ff8a..ad99c9cfedac7 100644 --- a/drivers/gpu/drm/drm_gpuva_mgr.c +++ b/drivers/gpu/drm/drm_gpuva_mgr.c @@ -1076,7 +1076,7 @@ __drm_gpuva_sm_map(struct drm_gpuva_manager *mgr, u64 req_addr, u64 req_range, struct drm_gem_object *req_obj, u64 req_offset) { - struct drm_gpuva *va, *next, *prev = NULL; + struct drm_gpuva *va, *next; u64 req_end = req_addr + req_range; int ret; @@ -1106,7 +1106,7 @@ __drm_gpuva_sm_map(struct drm_gpuva_manager *mgr, ret = op_unmap_cb(ops, priv, va, merge); if (ret) return ret; - goto next; + continue; } if (end > req_end) { @@ -1151,7 +1151,7 @@ __drm_gpuva_sm_map(struct drm_gpuva_manager *mgr, ret = op_remap_cb(ops, priv, &p, NULL, &u); if (ret) return ret; - goto next; + continue; } if (end > req_end) { @@ -1184,7 +1184,7 @@ __drm_gpuva_sm_map(struct drm_gpuva_manager *mgr, ret = op_unmap_cb(ops, priv, va, merge); if (ret) return ret; - goto next; + continue; } if (end > req_end) { @@ -1205,8 +1205,6 @@ __drm_gpuva_sm_map(struct drm_gpuva_manager *mgr, break; } } -next: - prev = va; } return op_map_cb(ops, priv,