Skip to content

Commit e26b51c

Browse files
hidrv4alexdeucher
authored andcommitted
drm/amd/display: Remove duplicate/repeating expressions
Remove duplicate or repeating expressions in the if condition evaluation. Issue identified using doubletest.cocci Coccinelle semantic patch. Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Deepak R Varma <drv@mailo.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 578292a commit e26b51c

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2353,8 +2353,7 @@ void dml32_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_l
23532353

23542354
if (mode_lib->vba.DSCEnable[k] && mode_lib->vba.ForcedOutputLinkBPP[k] != 0)
23552355
mode_lib->vba.DSCOnlyIfNecessaryWithBPP = true;
2356-
if ((mode_lib->vba.DSCEnable[k] || mode_lib->vba.DSCEnable[k])
2357-
&& mode_lib->vba.OutputFormat[k] == dm_n422
2356+
if (mode_lib->vba.DSCEnable[k] && mode_lib->vba.OutputFormat[k] == dm_n422
23582357
&& !mode_lib->vba.DSC422NativeSupport)
23592358
mode_lib->vba.DSC422NativeNotSupported = true;
23602359

@@ -3663,7 +3662,6 @@ void dml32_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_l
36633662
if (mode_lib->vba.SourcePixelFormat[k] != dm_444_64
36643663
&& mode_lib->vba.SourcePixelFormat[k] != dm_444_32
36653664
&& mode_lib->vba.SourcePixelFormat[k] != dm_444_16
3666-
&& mode_lib->vba.SourcePixelFormat[k] != dm_444_16
36673665
&& mode_lib->vba.SourcePixelFormat[k] != dm_444_8
36683666
&& mode_lib->vba.SourcePixelFormat[k] != dm_rgbe) {
36693667
if (mode_lib->vba.ViewportWidthChroma[k] > mode_lib->vba.SurfaceWidthC[k]

0 commit comments

Comments
 (0)