linux/drivers/thermal
Sascha Hauer 17e8351a77 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 <s.hauer@pengutronix.de>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
Reviewed-by: Darren Hart <dvhart@linux.intel.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Peter Feuerer <peter@piie.net>
Cc: Punit Agrawal <punit.agrawal@arm.com>
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Eduardo Valentin <edubezval@gmail.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: Jean Delvare <jdelvare@suse.de>
Cc: Peter Feuerer <peter@piie.net>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Lukasz Majewski <l.majewski@samsung.com>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: linux-acpi@vger.kernel.org
Cc: platform-driver-x86@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-omap@vger.kernel.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Darren Hart <dvhart@infradead.org>
Cc: lm-sensors@lm-sensors.org
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2015-08-03 23:15:50 +08:00
..
int340x_thermal thermal: consistently use int for temperatures 2015-08-03 23:15:50 +08:00
samsung thermal: consistently use int for temperatures 2015-08-03 23:15:50 +08:00
st thermal: consistently use int for temperatures 2015-08-03 23:15:50 +08:00
ti-soc-thermal thermal: consistently use int for temperatures 2015-08-03 23:15:50 +08:00
Kconfig Merge branches 'release' and 'thermal-soc' of .git into next 2015-06-11 12:52:14 +08:00
Makefile Merge branches 'release' and 'thermal-soc' of .git into next 2015-06-11 12:52:14 +08:00
armada_thermal.c thermal: consistently use int for temperatures 2015-08-03 23:15:50 +08:00
clock_cooling.c thermal: introduce clock cooling device 2014-11-20 10:43:16 -04:00
cpu_cooling.c thermal: cpu_cooling: Fix power calculation when CPUs are offline 2015-05-04 21:27:54 -07:00
db8500_cpufreq_cooling.c Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal into thermal-soc 2014-12-21 22:49:12 +08:00
db8500_thermal.c thermal: consistently use int for temperatures 2015-08-03 23:15:50 +08:00
dove_thermal.c thermal: consistently use int for temperatures 2015-08-03 23:15:50 +08:00
fair_share.c thermal: consistently use int for temperatures 2015-08-03 23:15:50 +08:00
gov_bang_bang.c thermal: consistently use int for temperatures 2015-08-03 23:15:50 +08:00
hisi_thermal.c thermal: consistently use int for temperatures 2015-08-03 23:15:50 +08:00
imx_thermal.c thermal: consistently use int for temperatures 2015-08-03 23:15:50 +08:00
intel_powerclamp.c Minor merge needed, due to function move. 2015-07-01 10:49:25 -07:00
intel_quark_dts_thermal.c thermal: consistently use int for temperatures 2015-08-03 23:15:50 +08:00
intel_soc_dts_iosf.c thermal: consistently use int for temperatures 2015-08-03 23:15:50 +08:00
intel_soc_dts_iosf.h Thermal: Intel SoC: DTS thermal IOSF core 2015-05-01 11:20:42 +08:00
intel_soc_dts_thermal.c Thermal: Intel SoC: DTS thermal use common APIs 2015-05-01 11:20:42 +08:00
kirkwood_thermal.c thermal: consistently use int for temperatures 2015-08-03 23:15:50 +08:00
of-thermal.c thermal: consistently use int for temperatures 2015-08-03 23:15:50 +08:00
power_allocator.c thermal: consistently use int for temperatures 2015-08-03 23:15:50 +08:00
qcom-spmi-temp-alarm.c thermal: consistently use int for temperatures 2015-08-03 23:15:50 +08:00
rcar_thermal.c thermal: consistently use int for temperatures 2015-08-03 23:15:50 +08:00
rockchip_thermal.c thermal: consistently use int for temperatures 2015-08-03 23:15:50 +08:00
spear_thermal.c thermal: consistently use int for temperatures 2015-08-03 23:15:50 +08:00
step_wise.c thermal: consistently use int for temperatures 2015-08-03 23:15:50 +08:00
tegra_soctherm.c thermal: consistently use int for temperatures 2015-08-03 23:15:50 +08:00
thermal_core.c thermal: consistently use int for temperatures 2015-08-03 23:15:50 +08:00
thermal_core.h Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal into thermal-soc 2015-06-11 10:55:42 +08:00
thermal_hwmon.c thermal: consistently use int for temperatures 2015-08-03 23:15:50 +08:00
thermal_hwmon.h thermal: hwmon: move hwmon support to single file 2013-09-03 09:09:12 -04:00
user_space.c Thermal: build thermal governors into thermal_sys module 2013-04-14 23:28:43 +08:00
x86_pkg_temp_thermal.c thermal: consistently use int for temperatures 2015-08-03 23:15:50 +08:00