From: Ivan Lipski Date: Mon, 27 May 2024 17:28:44 +0000 (-0400) Subject: drm/amd/display: Remove duplicate 'update_idle_uclk' in dcn401 clk_mgr code X-Git-Tag: v6.11-rc1~141^2~18^2~99 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0eea12b9bdd5f917c3fb00c5ef710398f7c7bfac;p=thirdparty%2Fkernel%2Flinux.git drm/amd/display: Remove duplicate 'update_idle_uclk' in dcn401 clk_mgr code [WHY] The coverity analysis flagged this if expression as it contains a 'CONSTANT_EXPRESSION_RESULT': 'update_idle_uclk' is 'ORd' with itself. [HOW] Removed the duplicate 'update_idle_uclk'. Reviewed-by: Alex Hung Acked-by: Zaeem Mohamed Signed-off-by: Ivan Lipski Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c index 0fbe615069f08..28769deaad373 100644 --- a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c +++ b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c @@ -940,7 +940,7 @@ static unsigned int dcn401_build_update_bandwidth_clocks_sequence( } /* CLK_MGR401_UPDATE_IDLE_HARDMINS */ - if ((update_idle_uclk || update_idle_uclk) && is_idle_dpm_enabled) { + if (update_idle_uclk && is_idle_dpm_enabled) { block_sequence[num_steps].params.update_idle_hardmin_params.uclk_mhz = idle_uclk_mhz; block_sequence[num_steps].params.update_idle_hardmin_params.fclk_mhz = idle_fclk_mhz; block_sequence[num_steps].func = CLK_MGR401_UPDATE_IDLE_HARDMINS;