From: Nicholas Mc Guire Date: Tue, 19 Jul 2016 19:54:06 +0000 (+0200) Subject: drm/radeon/ci add comment to document intentionally unreachable code X-Git-Tag: v4.8~318^2~2^2~53 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ecb2caae6aa7e33a8b413479d802a6b818316f97;p=platform%2Fkernel%2Flinux-amlogic.git 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 Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/radeon/ci_dpm.c b/drivers/gpu/drm/radeon/ci_dpm.c index 35e0fc3..7ba4508 100644 --- a/drivers/gpu/drm/radeon/ci_dpm.c +++ b/drivers/gpu/drm/radeon/ci_dpm.c @@ -3843,7 +3843,10 @@ static void ci_find_dpm_states_clocks_in_dpm_table(struct radeon_device *rdev, if (i >= sclk_table->count) { pi->need_update_smu7_dpm_table |= DPMTABLE_OD_UPDATE_SCLK; } else { - /* XXX check display min clock requirements */ + /* XXX The current code always reprogrammed the sclk levels, + * but we don't currently handle disp sclk requirements + * so just skip it. + */ if (CISLAND_MINIMUM_ENGINE_CLOCK != CISLAND_MINIMUM_ENGINE_CLOCK) pi->need_update_smu7_dpm_table |= DPMTABLE_UPDATE_SCLK; }