Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/radeon/ci add comment to document intentionally unreachable code

commit d967be9b80a5 ("drm/radeon/ci: disable needless sclk changes")
introduces an unreachable if(C != C) conditional code section
flagged by coccinelle script bad_conditional.cocci:

Add a comment to make it clear that this is intentional.

Fixes: d967be9b80a5 ("drm/radeon/ci: disable needless sclk changes")

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Nicholas Mc Guire and committed by
Alex Deucher
ecb2caae 23a1a9e5

+4 -1
+4 -1
drivers/gpu/drm/radeon/ci_dpm.c
··· 3843 3843 if (i >= sclk_table->count) { 3844 3844 pi->need_update_smu7_dpm_table |= DPMTABLE_OD_UPDATE_SCLK; 3845 3845 } else { 3846 - /* XXX check display min clock requirements */ 3846 + /* XXX The current code always reprogrammed the sclk levels, 3847 + * but we don't currently handle disp sclk requirements 3848 + * so just skip it. 3849 + */ 3847 3850 if (CISLAND_MINIMUM_ENGINE_CLOCK != CISLAND_MINIMUM_ENGINE_CLOCK) 3848 3851 pi->need_update_smu7_dpm_table |= DPMTABLE_UPDATE_SCLK; 3849 3852 }