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

drm/amd/display: remove unnecessary conditional operators



Since the variables named is_end_of_payload and hpd_status are already
bool type, the ?: conditional operator is unnecessary any more.

Clean them up here.

Reported-by: default avatarZeal Robot <zealci@zte.com.cn>
Reviewed-by: default avatarSimon Ser <contact@emersion.fr>
Signed-off-by: default avatarYe Guojin <ye.guojin@zte.com.cn>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 26db557e
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -789,8 +789,7 @@ static void dm_dmub_outbox1_low_irq(void *interrupt_params)
					plink = adev->dm.dc->links[notify.link_index];
					if (plink) {
						plink->hpd_status =
							notify.hpd_status ==
							DP_HPD_PLUG ? true : false;
							notify.hpd_status == DP_HPD_PLUG;
					}
				}
				queue_work(adev->dm.delayed_hpd_wq, &dmub_hpd_wrk->handle_hpd_work);
+1 −1
Original line number Diff line number Diff line
@@ -626,7 +626,7 @@ bool dal_ddc_submit_aux_command(struct ddc_service *ddc,
	do {
		struct aux_payload current_payload;
		bool is_end_of_payload = (retrieved + DEFAULT_AUX_MAX_DATA_SIZE) >=
				payload->length ? true : false;
				payload->length;
		uint32_t payload_length = is_end_of_payload ?
				payload->length - retrieved : DEFAULT_AUX_MAX_DATA_SIZE;