thermal: rcar_gen3_thermal: Do not shadow thcode variable
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Wed, 10 Jun 2020 00:33:00 +0000 (02:33 +0200)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Tue, 21 Jul 2020 13:01:43 +0000 (15:01 +0200)
commit679d10df716b78ece007414817ff6219f217afc9
tree0759dae45a5af352bd145a79d54d167101714c98
parentcff1d293bb3ad35fb1eedb2d2e462935f4a42489
thermal: rcar_gen3_thermal: Do not shadow thcode variable

The function rcar_gen3_thermal_calc_coefs() takes an argument called
'thcode' which shadows the static global 'thcode' variable. This is not
harmful but bad for readability and is harmful for planned changes to
the driver. The THCODE values should be read from hardware fuses if they
are available and only fallback to the global 'thcode' variable if they
are not fused.

Rename the global 'thcode' variable to 'thcodes' to avoid shadowing the
symbol in functions that take it as an argument.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20200610003300.884258-1-niklas.soderlund+renesas@ragnatech.se
drivers/thermal/rcar_gen3_thermal.c