All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/radeon: remove redundant assignment to reg
@ 2022-01-19 22:46 ` Colin Ian King
  0 siblings, 0 replies; 7+ messages in thread
From: Colin Ian King @ 2022-01-19 22:46 UTC (permalink / raw)
  To: Alex Deucher, Christian König, Xinhui.Pan, David Airlie,
	Daniel Vetter, amd-gfx, dri-devel
  Cc: kernel-janitors, linux-kernel, llvm

The pointer reg is being assigned a value that is not read, the
exit path via label 'out' never accesses it. The assignment is
redundant and can be removed.

Cleans up clang scan build warning:
drivers/gpu/drm/radeon/radeon_object.c:570:3: warning: Value
stored to 'reg' is never read [deadcode.DeadStores]

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 drivers/gpu/drm/radeon/radeon_object.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/radeon/radeon_object.c b/drivers/gpu/drm/radeon/radeon_object.c
index 56ede9d63b12..87536d205593 100644
--- a/drivers/gpu/drm/radeon/radeon_object.c
+++ b/drivers/gpu/drm/radeon/radeon_object.c
@@ -567,7 +567,6 @@ int radeon_bo_get_surface_reg(struct radeon_bo *bo)
 		return 0;
 
 	if (bo->surface_reg >= 0) {
-		reg = &rdev->surface_regs[bo->surface_reg];
 		i = bo->surface_reg;
 		goto out;
 	}
-- 
2.33.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-01-24 22:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-19 22:46 [PATCH] drm/radeon: remove redundant assignment to reg Colin Ian King
2022-01-19 22:46 ` Colin Ian King
2022-01-24 20:21 ` Nick Desaulniers
2022-01-24 20:21   ` Nick Desaulniers
2022-01-24 20:21   ` Nick Desaulniers
2022-01-24 22:09   ` Alex Deucher
2022-01-24 22:09     ` Alex Deucher

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.