]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/radeon/r600_cs: clean up of dead code in r600_cs
authorBrahmajit Das <listout@listout.xyz>
Mon, 11 Aug 2025 09:21:25 +0000 (14:51 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Oct 2025 09:56:30 +0000 (11:56 +0200)
commit42861028863a5e2e022a3c58dabcd98184375434
tree1a459e98183b7221febb59417a67f1de26688b46
parentdf452ea24ba790b74ad540cc2aaa49200ce9f36e
drm/radeon/r600_cs: clean up of dead code in r600_cs

[ Upstream commit 260dcf5b06d519bcf27a5dfdb5c626821a55c170 ]

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: 60b212f8ddcd ("drm/radeon: overhaul texture checking. (v3)")
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Brahmajit Das <listout@listout.xyz>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/radeon/r600_cs.c