Re: [PATCH RESEND 2/2] thermal: sprd: Fix raw temperature clamping in sprd_thm_rawdata_to_temp
From: Thorsten Blum
Date: Sat Mar 07 2026 - 05:29:26 EST
On 7. Mar 2026, at 11:24, Thorsten Blum wrote:
> The raw temperature data was never clamped to SPRD_THM_RAW_DATA_LOW or
> SPRD_THM_RAW_DATA_HIGH because the return value of clamp() was not used.
> Fix this by assigning the clamped value to 'rawdata'.
>
> Casting SPRD_THM_RAW_DATA_LOW and SPRD_THM_RAW_DATA_HIGH to u32 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>
> ---
> drivers/thermal/sprd_thermal.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> [...]
Feel free to squash them as they touch the same file and fix the same
commit.
Thanks,
Thorsten