Re: [PATCH RESEND] thermal: broadcom: Use clamp to simplify bcm2835_thermal_temp2adc

From: Luca Ceresoli
Date: Mon Jan 05 2026 - 12:34:29 EST


On Mon Jan 5, 2026 at 1:13 PM CET, Thorsten Blum wrote:
> Use clamp() to simplify bcm2835_thermal_temp2adc() and improve its
> readability. Explicitly cast BIT() to int to prevent a signedness error.
>
> Signed-off-by: Thorsten Blum <thorsten.blum@xxxxxxxxx>

Reviewed-by: Luca Ceresoli <luca.ceresoli@xxxxxxxxxxx>

--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com