* [PATCH] drm/amdgpu/powerplay: fix warning in smu_v11_0.c
@ 2020-01-09 20:44 Alex Deucher
2020-01-10 3:15 ` Quan, Evan
0 siblings, 1 reply; 2+ messages in thread
From: Alex Deucher @ 2020-01-09 20:44 UTC (permalink / raw)
To: amd-gfx; +Cc: Alex Deucher
Cast to make min() happy. The values are well within
range.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
index 76bddd582c60..02f8c9cb89d9 100644
--- a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
+++ b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
@@ -1159,7 +1159,7 @@ static int smu_v11_0_set_thermal_range(struct smu_context *smu,
low = max(SMU_THERMAL_MINIMUM_ALERT_TEMP,
range.min / SMU_TEMPERATURE_UNITS_PER_CENTIGRADES);
- high = min(SMU_THERMAL_MAXIMUM_ALERT_TEMP, powerplay_table->software_shutdown_temp);
+ high = min((uint16_t)SMU_THERMAL_MAXIMUM_ALERT_TEMP, powerplay_table->software_shutdown_temp);
if (low > high)
return -EINVAL;
--
2.24.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 2+ messages in thread
* RE: [PATCH] drm/amdgpu/powerplay: fix warning in smu_v11_0.c
2020-01-09 20:44 [PATCH] drm/amdgpu/powerplay: fix warning in smu_v11_0.c Alex Deucher
@ 2020-01-10 3:15 ` Quan, Evan
0 siblings, 0 replies; 2+ messages in thread
From: Quan, Evan @ 2020-01-10 3:15 UTC (permalink / raw)
To: Alex Deucher, amd-gfx; +Cc: Deucher, Alexander
Reviewed-by: Evan Quan <evan.quan@amd.com>
> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of Alex
> Deucher
> Sent: Friday, January 10, 2020 4:45 AM
> To: amd-gfx@lists.freedesktop.org
> Cc: Deucher, Alexander <Alexander.Deucher@amd.com>
> Subject: [PATCH] drm/amdgpu/powerplay: fix warning in smu_v11_0.c
>
> Cast to make min() happy. The values are well within
> range.
>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> ---
> drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
> b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
> index 76bddd582c60..02f8c9cb89d9 100644
> --- a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
> +++ b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
> @@ -1159,7 +1159,7 @@ static int smu_v11_0_set_thermal_range(struct
> smu_context *smu,
>
> low = max(SMU_THERMAL_MINIMUM_ALERT_TEMP,
> range.min /
> SMU_TEMPERATURE_UNITS_PER_CENTIGRADES);
> - high = min(SMU_THERMAL_MAXIMUM_ALERT_TEMP,
> powerplay_table->software_shutdown_temp);
> + high = min((uint16_t)SMU_THERMAL_MAXIMUM_ALERT_TEMP,
> powerplay_table->software_shutdown_temp);
>
> if (low > high)
> return -EINVAL;
> --
> 2.24.1
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.free
> desktop.org%2Fmailman%2Flistinfo%2Famd-
> gfx&data=02%7C01%7Cevan.quan%40amd.com%7C4672d7f3341f44a41fa
> 608d79544cd4e%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C6371
> 41995209778022&sdata=TRtFdbV9rFibTHYzbpeFqo8nxMYMi%2Fk9mikRTf
> yDwaM%3D&reserved=0
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-01-10 3:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-09 20:44 [PATCH] drm/amdgpu/powerplay: fix warning in smu_v11_0.c Alex Deucher
2020-01-10 3:15 ` Quan, Evan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.