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

Luca Ceresoli luca.ceresoli at bootlin.com
Mon Jan 5 09:34:14 PST 2026


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 at linux.dev>

Reviewed-by: Luca Ceresoli <luca.ceresoli at bootlin.com>

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



More information about the linux-arm-kernel mailing list