[PATCH] drm/amd/display: Fix useless else if in display_mode_vba_util_32.c

Rodrigo Siqueira Jordao Rodrigo.Siqueira at amd.com
Wed Aug 16 18:07:16 UTC 2023



On 8/16/23 00:51, Srinivasan Shanmugam wrote:
> The assignment of the else if and else branches is the same, so the else if
> here is redundant, hence removed it.
> 
> Fixes the below:
> 
> drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c:4664:8-10: WARNING: possible condition with no effect (if == else)
> 
> Cc: Hamza Mahfooz <hamza.mahfooz at amd.com>
> Cc: Harry Wentland <harry.wentland at amd.com>
> Cc: Rodrigo Siqueira <Rodrigo.Siqueira at amd.com>
> Cc: Aurabindo Pillai <aurabindo.pillai at amd.com>
> Cc: Alex Deucher <alexander.deucher at amd.com>
> Cc: Christian König <christian.koenig at amd.com>
> Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam at amd.com>
> ---
>   .../drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c   | 4 ----
>   1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c b/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c
> index ecea008f19d3..d940dfa5ae43 100644
> --- a/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c
> +++ b/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c
> @@ -4661,10 +4661,6 @@ void dml32_CalculateMinAndMaxPrefetchMode(
>   	} else if (AllowForPStateChangeOrStutterInVBlankFinal == dm_prefetch_support_uclk_fclk_and_stutter) {
>   		*MinPrefetchMode = 0;
>   		*MaxPrefetchMode = 0;
> -	} else if (AllowForPStateChangeOrStutterInVBlankFinal ==
> -			dm_prefetch_support_uclk_fclk_and_stutter_if_possible) {
> -		*MinPrefetchMode = 0;
> -		*MaxPrefetchMode = 3;
>   	} else {
>   		*MinPrefetchMode = 0;
>   		*MaxPrefetchMode = 3;

Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira at amd.com>


More information about the amd-gfx mailing list