Commit e26b51c7 authored by Deepak R Varma's avatar Deepak R Varma Committed by Alex Deucher
Browse files

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: default avatarHarry Wentland <harry.wentland@amd.com>
Signed-off-by: default avatarDeepak R Varma <drv@mailo.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 578292aa
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -2353,8 +2353,7 @@ void dml32_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_l

			if (mode_lib->vba.DSCEnable[k] && mode_lib->vba.ForcedOutputLinkBPP[k] != 0)
				mode_lib->vba.DSCOnlyIfNecessaryWithBPP = true;
			if ((mode_lib->vba.DSCEnable[k] || mode_lib->vba.DSCEnable[k])
					&& mode_lib->vba.OutputFormat[k] == dm_n422
			if (mode_lib->vba.DSCEnable[k] && mode_lib->vba.OutputFormat[k] == dm_n422
					&& !mode_lib->vba.DSC422NativeSupport)
				mode_lib->vba.DSC422NativeNotSupported = true;

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