Commit abd51738 authored by Luben Tuikov's avatar Luben Tuikov Committed by Alex Deucher
Browse files

drm/amdgpu: Fix minmax warning



Fix minmax warning by using min_t() macro and explicitly specifying
the assignment type.

Cc: Alex Deucher <Alexander.Deucher@amd.com>
Signed-off-by: default avatarLuben Tuikov <luben.tuikov@amd.com>
Reviewed-by: default avatarAlex Deucher <Alexander.Deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 0317d739
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -1436,7 +1436,9 @@ static int smu_v13_0_irq_process(struct amdgpu_device *adev,
			case 0x8:
				high = smu->thermal_range.software_shutdown_temp +
					smu->thermal_range.software_shutdown_temp_offset;
				high = min(SMU_THERMAL_MAXIMUM_ALERT_TEMP, high);
				high = min_t(typeof(high),
					     SMU_THERMAL_MAXIMUM_ALERT_TEMP,
					     high);
				dev_emerg(adev->dev, "Reduce soft CTF limit to %d (by an offset %d)\n",
							high,
							smu->thermal_range.software_shutdown_temp_offset);
@@ -1449,7 +1451,8 @@ static int smu_v13_0_irq_process(struct amdgpu_device *adev,
				WREG32_SOC15(THM, 0, regTHM_THERMAL_INT_CTRL, data);
				break;
			case 0x9:
				high = min(SMU_THERMAL_MAXIMUM_ALERT_TEMP,
				high = min_t(typeof(high),
					     SMU_THERMAL_MAXIMUM_ALERT_TEMP,
					     smu->thermal_range.software_shutdown_temp);
				dev_emerg(adev->dev, "Recover soft CTF limit to %d\n", high);