Re: [PATCH 01/15] thermal: consistently use int for temperatures

From: Sascha Hauer
Date: Wed May 20 2015 - 04:35:09 EST


On Wed, May 20, 2015 at 10:12:44AM +0300, Mikko Perttunen wrote:
> On 05/13/15 11:52, Sascha Hauer wrote:
> >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. 'long' is 64bit on several
> >architectures which is not needed. Consistently use a plain 'int'
> >for temperatures.
> >
> >Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
> >---
> >...
>
> It looks like some longs remain in db8500_thermal.c, int340x_thermal/*,
> intel_soc_dts_thermal.c, kirkwood_thermal.c, rockchip_thermal.c and
> samsung/exynos_tmu.c. (found by 'grep -R long drivers/thermal/*)

I looked over it again and found the following. Sorry, I really thought
I had compile tested all drivers. I found nothing in db8500_thermal.c,
intel_soc_dts_thermal.c and rockchip_thermal.c though. There are some
(unsigned)longs used as temperatures in these files, but I haven't
changed them on purpose to not make the patch bigger as necessary. I
only changed the places where (unsigned)longs are used as pointers.
Do you think it's necessary to change all temperatures, even the ones
only used internally in drivers?

Sascha

-----------------------8<------------------