Skip to contentSkip to conversation

drm/amd/display: remove possible condition with no effect (if == else)

PATCH Applied Yang Li 2 participants 2 messages Sep 1, 2022 – Sep 9, 2022

Subsystems (4)
lore
Share & tools
lore

Yang Li

author
#0 lore raw

PATCH 1/1 drm/amd/display: remove possible condition with no effect (if == else)

Conditional statements have no effect to next process.So remove it.

---
 .../drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c   | 4 ----
 1 file changed, 4 deletions(-)
drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c +0 -4
index e4fd540dec0f..8f1c0e12dd86 100644
@@ -4663,10 +4663,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;
Signature · 1 line
2.20.1.7.g153144c
Applied
#1 lore raw

Applied. Thanks!

Alex

Quoted 28 lines · Yang Li

Conditional statements have no effect to next process.So remove it.

---
 .../drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c   | 4 ----
 1 file changed, 4 deletions(-)
drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c +0 -5
index e4fd540dec0f..8f1c0e12dd86 100644
@@ -4663,10 +4663,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;
--

2.20.1.7.g153144c