Received: by 10.192.165.156 with SMTP id m28csp471246imm; Fri, 13 Apr 2018 02:21:10 -0700 (PDT) X-Google-Smtp-Source: AIpwx48OnGAzTAWzKClWatN1uLShzWkj2ypC2PHsMNHeTfx1DWOh8XN9EjeEypgsoAM/yKFw53rZ X-Received: by 10.98.75.12 with SMTP id y12mr10853810pfa.140.1523611270893; Fri, 13 Apr 2018 02:21:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523611270; cv=none; d=google.com; s=arc-20160816; b=MP6qkRRzoCwjADxP3QmPc2StgwUbfk8koNKkLH+rvPwWX4jpu7Bsf45J9akSpK8NN/ FsUsM2sGBTsT0AryO4pd86ecN1dRJzMA8ceQzYM26FL86gS6mgL63gCfoJzwtQmYHM8b VfHsSEz7R/XfXyIAoIZ8PxyiN1G/VET9SaBBXQnJHlAVmkymASBYbhjUksOa2VgtnfAy emmg3ZnjbcANt0A3bfNxVw6uvLxMQgDbMicPT2GLYiACOKcQLzFk/Qs3qTr9k1la5WRL +oHxinIvSZ2vDTBZSAN927GWTf/Ug3ChseANttbkDT9prMohXs93Hjt5tknPuHl/Dc00 5MXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=PtEHfZnWEPJ5134HCvZ8fOoZHWrhqiDsKbrvgr7s20s=; b=xAHSVjH+Y7ZYa3D8Uh9ZUf3LVRcC+H3VeRgdpnGuKY0J9Zm6MaDm824dx2dnfr7mxD pxAMxgoGiXj9mDivUWPbrLyvf8XFozZZvVy0zmLyHVDucNqpy49L08cNIf+674+PCMLN hh1pveSUiU9Szta07V27ju0kHE7kcezXtDVFKydkmyKOYF14233QGdx34YZQTp+F0kYR WUnLgYPAPZoaYv35u1XUiMq8yeBRBX/9rYLXji/MakrBXnPn+wNq09g3MkljGK8fWUXY zUV9scgVpYv9TX4ZRLaJHmmIo61EMxRthuDuKkLzoAda2y1Q/XZKbdX8pi73I6/f6Alb /r4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ii8SSsOo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q6si3614868pgt.130.2018.04.13.02.20.56; Fri, 13 Apr 2018 02:21:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ii8SSsOo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754086AbeDMJTq (ORCPT + 99 others); Fri, 13 Apr 2018 05:19:46 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:55234 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751776AbeDMJTo (ORCPT ); Fri, 13 Apr 2018 05:19:44 -0400 Received: by mail-wm0-f65.google.com with SMTP id r191so3745137wmg.4 for ; Fri, 13 Apr 2018 02:19:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=PtEHfZnWEPJ5134HCvZ8fOoZHWrhqiDsKbrvgr7s20s=; b=Ii8SSsOo3rB2Rrot2M3ExF9a8XkwJSD5nkOqHSvFuelcTGYCGaqi3Wfo5zMA4z3opl d+DR0qfsQO6M7ugsHnhvNqrMIlBz0RYbTVQlDSONqK+HqCfdSJAAZ0S5NklL/rWZzZZE bhJyff193rEQh6usk6Z62COa/R/ZnNSBqmOQw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=PtEHfZnWEPJ5134HCvZ8fOoZHWrhqiDsKbrvgr7s20s=; b=bMofqmOMfFkdweu/wvhxKjIfjXfdfITCjrXeafIxH3tub90IdCSrU97gWPYCZZNOnC 8e8caqyw5Js9wfZXyivSHwUqYmXaObp8UPIcAT5wi4xW4BgRsGW7n4dgwfEmtfXRBjXr of/gQt7FGRZMAAX6KYc+L7UrPxUn4MeVLrPTvHWwCn+L4PT/jlQPb30HqigUD3xSklG4 3Uab+h3eMOkY6ZvMMptemRw0EA/BlC6Jkb9CP5H6fwGa1Ln27OjvL0c9LhlYfOrjlkkD fxccR2f+OuquO9+guFG5DaojZ7nUS22cDtemipYAGMYqIwORzwYcqhcPUQhslUvSUR6r +GOA== X-Gm-Message-State: ALQs6tCf6WlnJIuCK96mSwZO30FD+JUO95rEo+Nbbsh2QaZdxiD5B5Bh UZ/CKfHc45v3XPrbt4lLD8r+2w== X-Received: by 10.28.88.141 with SMTP id m135mr3011726wmb.156.1523611182908; Fri, 13 Apr 2018 02:19:42 -0700 (PDT) Received: from [192.168.8.101] ([37.170.104.147]) by smtp.googlemail.com with ESMTPSA id l1sm876145wmh.25.2018.04.13.02.19.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Apr 2018 02:19:41 -0700 (PDT) Subject: Re: [GIT PULL] Thermal management updates for v4.17-rc1 To: Bartlomiej Zolnierkiewicz Cc: Zhang Rui , Eduardo Valentin , Linus Torvalds , LKML , Linux PM list , "Li, Philip" References: <1523436077.16235.5.camel@intel.com> <2944702.qKZ0LXufY7@amdc3058> <5afdb571-8aaa-941f-ff4f-7c4b031b5efb@linaro.org> <3546651.LUmDXQgY88@amdc3058> From: Daniel Lezcano Message-ID: <16cbc915-ad89-7bab-c644-8086cfef082f@linaro.org> Date: Fri, 13 Apr 2018 11:19:40 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <3546651.LUmDXQgY88@amdc3058> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 >>>>>> 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 ...; -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog