[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240415095659.482989-1-colin.i.king@gmail.com>
Date: Mon, 15 Apr 2024 10:56:59 +0100
From: Colin Ian King <colin.i.king@...il.com>
To: Jani Nikula <jani.nikula@...ux.intel.com>,
Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@...el.com>,
Tvrtko Ursulin <tursulin@...ulin.net>,
David Airlie <airlied@...il.com>,
Daniel Vetter <daniel@...ll.ch>,
Andi Shyti <andi.shyti@...ux.intel.com>,
intel-gfx@...ts.freedesktop.org,
dri-devel@...ts.freedesktop.org
Cc: kernel-janitors@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH][next] drm/i915: remove redundant assignement to variable err
The variable err is being assigned a value 0 that is never read, the
break statement escapes a do-while loop and then the code returns
without referencing err. The assignment is redundant and can be
removed.
Cleans up clang scan build warning:
drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c:1075:5: warning: Value
stored to 'err' is never read [deadcode.DeadStores]
Signed-off-by: Colin Ian King <colin.i.king@...il.com>
---
drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c
index 99a9ade73956..9ca9e9505244 100644
--- a/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c
+++ b/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c
@@ -1071,10 +1071,8 @@ static int igt_fill_mappable(struct intel_memory_region *mr,
if (err != -ENXIO && err != -ENOMEM)
goto err_close;
- if (size == mr->min_page_size) {
- err = 0;
+ if (size == mr->min_page_size)
break;
- }
size >>= 1;
continue;
--
2.39.2
Powered by blists - more mailing lists