Re: [PATCH RESEND 1/2] thermal: sprd: Fix temperature clamping in sprd_thm_temp_to_rawdata

From: Daniel Lezcano

Date: Tue Mar 10 2026 - 06:20:16 EST


On 3/7/26 11:24, Thorsten Blum wrote:
The temperature was never clamped to SPRD_THM_TEMP_LOW or
SPRD_THM_TEMP_HIGH because the return value of clamp() was not used. Fix
this by assigning the clamped value to 'temp'.

Casting SPRD_THM_TEMP_LOW and SPRD_THM_TEMP_HIGH to int is also
redundant and can be removed.

Fixes: 554fdbaf19b1 ("thermal: sprd: Add Spreadtrum thermal driver support")
Cc: stable@xxxxxxxxxxxxxxx
Reviewed-by: Baolin Wang <baolin.wang@xxxxxxxxxxxxxxxxx>
Signed-off-by: Thorsten Blum <thorsten.blum@xxxxxxxxx>
---

Applied, thanks !