Commit 42861028 authored by Brahmajit Das's avatar Brahmajit Das Committed by Greg Kroah-Hartman
Browse files

drm/radeon/r600_cs: clean up of dead code in r600_cs



[ Upstream commit 260dcf5b ]

GCC 16 enables -Werror=unused-but-set-variable= which results in build
error with the following message.

drivers/gpu/drm/radeon/r600_cs.c: In function ‘r600_texture_size’:
drivers/gpu/drm/radeon/r600_cs.c:1411:29: error: variable ‘level’ set but not used [-Werror=unused-but-set-variable=]
 1411 |         unsigned offset, i, level;
      |                             ^~~~~
cc1: all warnings being treated as errors
make[6]: *** [scripts/Makefile.build:287: drivers/gpu/drm/radeon/r600_cs.o] Error 1

level although is set, but in never used in the function
r600_texture_size. Thus resulting in dead code and this error getting
triggered.

Fixes: 60b212f8 ("drm/radeon: overhaul texture checking. (v3)")
Acked-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarBrahmajit Das <listout@listout.xyz>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent df452ea2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment