]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
thermal/drivers/brcmstb_thermal: Use max to simplify brcmstb_get_temp
authorThorsten Blum <thorsten.blum@linux.dev>
Thu, 2 Apr 2026 16:56:18 +0000 (18:56 +0200)
committerDaniel Lezcano <daniel.lezcano@kernel.org>
Thu, 2 Apr 2026 17:23:54 +0000 (19:23 +0200)
commit29cbf826d5674a0ea1b101c13861416c7f217304
tree90042584c54216d80bfadecee29c04a9012344b9
parent8f271fe15eaef9eeed6229a78adf6565cc554b63
thermal/drivers/brcmstb_thermal: Use max to simplify brcmstb_get_temp

Use max() to simplify brcmstb_get_temp() and improve its readability.
Since avs_tmon_code_to_temp() returns an int, change the data type of
the local variable 't' from long to int.  No functional changes.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Daniel Lezcano <daniel.lezcano@kernel.org>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Link: https://patch.msgid.link/20260402165616.895305-3-thorsten.blum@linux.dev
drivers/thermal/broadcom/brcmstb_thermal.c