Commit 88ac6df8 authored by Ye Guojin's avatar Ye Guojin Committed by Alex Deucher
Browse files

drm/amd/display: fix cond_no_effect.cocci warnings



This was found by coccicheck:
./drivers/gpu/drm/amd/display/dc/core/dc_resource.c, 2516, 7-9, WARNING
possible condition with no effect (if == else)

hdmi_info.bits.YQ0_YQ1 is always YYC_QUANTIZATION_LIMITED_RANGE.

Reported-by: default avatarZeal Robot <zealci@zte.com.cn>
Signed-off-by: default avatarYe Guojin <ye.guojin@zte.com.cn>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 1da2fcc4
Loading
Loading
Loading
Loading
+1 −11
Original line number Diff line number Diff line
@@ -2509,16 +2509,6 @@ static void set_avi_info_frame(

	/* TODO : We should handle YCC quantization */
	/* but we do not have matrix calculation */
	if (stream->qy_bit == 1) {
		if (color_space == COLOR_SPACE_SRGB ||
			color_space == COLOR_SPACE_2020_RGB_FULLRANGE)
			hdmi_info.bits.YQ0_YQ1 = YYC_QUANTIZATION_LIMITED_RANGE;
		else if (color_space == COLOR_SPACE_SRGB_LIMITED ||
					color_space == COLOR_SPACE_2020_RGB_LIMITEDRANGE)
			hdmi_info.bits.YQ0_YQ1 = YYC_QUANTIZATION_LIMITED_RANGE;
		else
			hdmi_info.bits.YQ0_YQ1 = YYC_QUANTIZATION_LIMITED_RANGE;
	} else
	hdmi_info.bits.YQ0_YQ1 = YYC_QUANTIZATION_LIMITED_RANGE;

	///VIC