Re: [GIT PULL] Thermal management updates for v4.17-rc1

From: Daniel Lezcano
Date: Thu Apr 12 2018 - 13:42:19 EST


On 12/04/2018 18:55, Linus Torvalds wrote:
> On Wed, Apr 11, 2018 at 10:08 PM, Zhang Rui <rui.zhang@xxxxxxxxx> wrote:
>>
>> could you please illustrate me what the kconfig & warning is?
>
> Just "make allmodconfig" and the warning is about a uninitialized variable.
>
> Line 304 in drivers/thermal/samsung/exynos_tmu.c if my shell history
> is to be believed.
>
> Linus

These couple of warnings were introduced by:

commit 480b5bfc16e17ef51ca1c55bfcebf55db8673ebf
Author: Bartlomiej Zolnierkiewicz <b.zolnierkie@xxxxxxxxxxx>
Date: Tue Mar 6 15:43:45 2018 +0100

thermal: exynos: remove parsing of samsung, tmu_default_temp_offset
property

Trimming (one point based or two points based) is always used for
the temperature calibration and the default non-trimming code should
never be reached.

Modify temp_to_code() and code_to_temp() accordingly (WARN_ON(1)
in the default cases) and then remove no longer needed parsing of
samsung,tmu_default_temp_offset property.

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@xxxxxxxxxxx>
Signed-off-by: Eduardo Valentin <edubezval@xxxxxxxxx>


After digging into, there is no obvious fix. It returns effectively an
uninitialized value and the callers are assuming the value is always
correct, so it is also not possible to simply return an error.


--
<http://www.linaro.org/> Linaro.org â Open source software for ARM SoCs

Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog