From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Cc: Zhang Rui <rui.zhang@intel.com>,
Eduardo Valentin <edubezval@gmail.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>,
Linux PM list <linux-pm@vger.kernel.org>,
"Li, Philip" <philip.li@intel.com>
Subject: Re: [GIT PULL] Thermal management updates for v4.17-rc1
Date: Fri, 13 Apr 2018 11:19:40 +0200 [thread overview]
Message-ID: <16cbc915-ad89-7bab-c644-8086cfef082f@linaro.org> (raw)
In-Reply-To: <3546651.LUmDXQgY88@amdc3058>
On 13/04/2018 11:08, Bartlomiej Zolnierkiewicz wrote:
> On Friday, April 13, 2018 11:00:43 AM Daniel Lezcano wrote:
>> On 13/04/2018 10:55, Bartlomiej Zolnierkiewicz wrote:
>>> On Friday, April 13, 2018 01:39:05 PM Zhang Rui wrote:
>>>> Hi, Eduardo,
>>>>
>>>> On 四, 2018-04-12 at 21:08 -0700, Eduardo Valentin wrote:
>>>>> Hello,
>>>>>
>>>>> On Thu, Apr 12, 2018 at 09:55:19AM -0700, Linus Torvalds wrote:
>>>>>>
>>>>>> On Wed, Apr 11, 2018 at 10:08 PM, Zhang Rui <rui.zhang@intel.com>
>>>>>> 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
>>>>> Yeah, this has also passed my local compilation error. Somehow my
>>>>> gcc4.9
>>>>> is not catching it. Using an older gcc (gcc4.6) does catch it.
>>>>>
>>>>> Anyways, given that the conversion functions are written to cover
>>>>> for unexpected cal_type, the right way of fixing this is to rewrite
>>>>> the conversion functions to allow for returning error codes and
>>>>> adjusting the callers as expected.
>>>>>
>>>>> Rui, bzolnier, please consider the following fix:
>>>>>
>>>> as it is late in this merge window, I'd prefer to
>>>> 1. drop all the thermal-soc material in the first pull request which I
>>>> will send out soon.
>>>> 2. you can prepare another pull request containing the thermal-soc
>>>> materials except the exynos fixes
>>>> 3. exynos fixes with the problem solved can be queued for -rc2 or
>>>> later.
>>>
>>> Could you please just merge the obvious fix from Arnd instead?
>>>
>>> [ it was posted two weeks ago and ACKed by me ]
>>>
>>> https://patchwork.kernel.org/patch/10313313/
>>
>> I'm not sure these are correct fixes.
>>
>> The change 480b5bfc16e1 tells:
>>
>> "There should be no functional changes caused by this patch."
>>
>> but the fix above returns 0 as a default value instead of '50' or '25'
>> for the 5440 and that impacts the threshold etc ...
>>
>> IMO, the correct fix would be to define a default value '50', override
>> it at init time to '25' if it is a 5440. And then the variable 'temp'
>> and 'temp_code' get this value in the default case.
>
> It is okay to return 0 because this code-path (the default one) will be
> never hit by the driver (probe makes sure of it) - the default case is
> here is just to silence compilation errors..
The init function is making sure cal_type is one or another. Can you fix
it correctly by replacing the 'switch' by a 'if' instead of adding dead
branches to please gcc?
if (data->cal_type == TYPE_TWO_POINT_TRIMMING) {
return ...;
}
return ...;
--
<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
next prev parent reply other threads:[~2018-04-13 9:19 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-11 8:41 Zhang Rui
2018-04-12 0:01 ` Linus Torvalds
2018-04-12 5:08 ` Zhang Rui
2018-04-12 16:55 ` Linus Torvalds
2018-04-12 17:42 ` Daniel Lezcano
2018-04-13 4:08 ` Eduardo Valentin
2018-04-13 5:29 ` Zhang Rui
2018-04-13 5:39 ` Zhang Rui
2018-04-13 8:55 ` Bartlomiej Zolnierkiewicz
2018-04-13 9:00 ` Daniel Lezcano
[not found] ` <CGME20180413090820epcas1p17dd97e3815909e0714f9d5a80eb82be9@epcas1p1.samsung.com>
2018-04-13 9:08 ` Bartlomiej Zolnierkiewicz
2018-04-13 9:19 ` Daniel Lezcano [this message]
[not found] ` <CGME20180413092901epcas2p43245301152a01c782620f0ab95b2a692@epcas2p4.samsung.com>
2018-04-13 9:28 ` Bartlomiej Zolnierkiewicz
2018-04-13 10:30 ` Daniel Lezcano
[not found] ` <CGME20180413104120epcas1p319b9e78b025cb68f810f047c67a48362@epcas1p3.samsung.com>
2018-04-13 10:41 ` Bartlomiej Zolnierkiewicz
2018-04-13 11:00 ` [PATCH] thermal/drivers/exynos_tmu: Fix warnings in temp_to_code / code_to_temp Daniel Lezcano
2018-04-13 11:08 ` Bartlomiej Zolnierkiewicz
2018-04-13 11:10 ` [GIT PULL] Thermal management updates for v4.17-rc1 Daniel Lezcano
[not found] ` <CGME20180413111242epcas1p4cd5ecac004dd9c1e00e1608088ff88e2@epcas1p4.samsung.com>
2018-04-13 11:12 ` Bartlomiej Zolnierkiewicz
[not found] ` <CGME20180413112148epcas1p3f657cb50af4151d41f8c404e6b0d5fab@epcas1p3.samsung.com>
2018-04-13 11:21 ` Bartlomiej Zolnierkiewicz
2018-04-13 10:08 ` Eduardo Valentin
2018-04-13 10:25 ` Eduardo Valentin
2018-04-13 10:27 ` Bartlomiej Zolnierkiewicz
2018-04-15 8:51 ` Eduardo Valentin
2018-04-13 8:50 ` Bartlomiej Zolnierkiewicz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=16cbc915-ad89-7bab-c644-8086cfef082f@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=b.zolnierkie@samsung.com \
--cc=edubezval@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=philip.li@intel.com \
--cc=rui.zhang@intel.com \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®