Skip to content
Commit b03628b7 authored by Niklas Söderlund's avatar Niklas Söderlund Committed by Daniel Lezcano
Browse files

thermal: rcar_thermal: Clean up rcar_thermal_update_temp()



Moving the ctemp variable out of the private data structure made it
possible to clean up rcar_thermal_update_temp(). Initialize the local
ctemp to the error code to return if the reading fails and just return
it at the end of the function.

It's OK to change the datatype of old, new and ctemp to int as all
values are ANDed with CTEMP (0x3f) before being stored. While at it
change the datatype of the loop variable 'i' to to unsigned int.

Suggested-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: default avatarNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20200514152505.1927634-1-niklas.soderlund+renesas@ragnatech.se
parent 1ab20c0e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment