]> Git Repo - linux.git/commit - drivers/thermal/thermal_hwmon.c
thermal: consistently use int for temperatures
authorSascha Hauer <[email protected]>
Fri, 24 Jul 2015 06:12:54 +0000 (08:12 +0200)
committerZhang Rui <[email protected]>
Mon, 3 Aug 2015 15:15:50 +0000 (23:15 +0800)
commit17e8351a77397e8a83727eb17e3a3e9b8ab5257a
tree9087ea501d32baa56842d112c071cbe57eede870
parent25a0a5ce16ecd7e60c4cf1436892433873e9d99d
thermal: consistently use int for temperatures

The thermal code uses int, long and unsigned long for temperatures
in different places.

Using an unsigned type limits the thermal framework to positive
temperatures without need. Also several drivers currently will report
temperatures near UINT_MAX for temperatures below 0°C. This will probably
immediately shut the machine down due to overtemperature if started below
0°C.

'long' is 64bit on several architectures. This is not needed since INT_MAX °mC
is above the melting point of all known materials.

Consistently use a plain 'int' for temperatures throughout the thermal code and
the drivers. This only changes the places in the drivers where the temperature
is passed around as pointer, when drivers internally use another type this is
not changed.

Signed-off-by: Sascha Hauer <[email protected]>
Acked-by: Geert Uytterhoeven <[email protected]>
Reviewed-by: Jean Delvare <[email protected]>
Reviewed-by: Lukasz Majewski <[email protected]>
Reviewed-by: Darren Hart <[email protected]>
Reviewed-by: Heiko Stuebner <[email protected]>
Reviewed-by: Peter Feuerer <[email protected]>
Cc: Punit Agrawal <[email protected]>
Cc: Zhang Rui <[email protected]>
Cc: Eduardo Valentin <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: Jean Delvare <[email protected]>
Cc: Peter Feuerer <[email protected]>
Cc: Heiko Stuebner <[email protected]>
Cc: Lukasz Majewski <[email protected]>
Cc: Stephen Warren <[email protected]>
Cc: Thierry Reding <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: Guenter Roeck <[email protected]>
Cc: Rafael J. Wysocki <[email protected]>
Cc: Maxime Ripard <[email protected]>
Cc: Darren Hart <[email protected]>
Cc: [email protected]
Signed-off-by: Zhang Rui <[email protected]>
39 files changed:
drivers/acpi/thermal.c
drivers/hwmon/lm75.c
drivers/hwmon/ntc_thermistor.c
drivers/hwmon/tmp102.c
drivers/input/touchscreen/sun4i-ts.c
drivers/platform/x86/acerhdf.c
drivers/platform/x86/intel_mid_thermal.c
drivers/power/charger-manager.c
drivers/power/power_supply_core.c
drivers/thermal/armada_thermal.c
drivers/thermal/db8500_thermal.c
drivers/thermal/dove_thermal.c
drivers/thermal/fair_share.c
drivers/thermal/gov_bang_bang.c
drivers/thermal/hisi_thermal.c
drivers/thermal/imx_thermal.c
drivers/thermal/int340x_thermal/int3400_thermal.c
drivers/thermal/int340x_thermal/int340x_thermal_zone.c
drivers/thermal/int340x_thermal/int340x_thermal_zone.h
drivers/thermal/int340x_thermal/processor_thermal_device.c
drivers/thermal/intel_quark_dts_thermal.c
drivers/thermal/intel_soc_dts_iosf.c
drivers/thermal/kirkwood_thermal.c
drivers/thermal/of-thermal.c
drivers/thermal/power_allocator.c
drivers/thermal/qcom-spmi-temp-alarm.c
drivers/thermal/rcar_thermal.c
drivers/thermal/rockchip_thermal.c
drivers/thermal/samsung/exynos_tmu.c
drivers/thermal/spear_thermal.c
drivers/thermal/st/st_thermal.c
drivers/thermal/step_wise.c
drivers/thermal/tegra_soctherm.c
drivers/thermal/thermal_core.c
drivers/thermal/thermal_hwmon.c
drivers/thermal/ti-soc-thermal/ti-thermal-common.c
drivers/thermal/x86_pkg_temp_thermal.c
include/linux/thermal.h
include/trace/events/thermal_power_allocator.h
This page took 0.086052 seconds and 4 git commands to generate.