Received: by 10.192.165.156 with SMTP id m28csp490502imm; Fri, 13 Apr 2018 02:45:44 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+CMio80fl+2nCBiKQV2JkVJusd5PQfR3H0/RGWzROgVqrRdr2PeYO9Sd7Jsp6GgXX5jwZs X-Received: by 2002:a17:902:3341:: with SMTP id a59-v6mr4600321plc.68.1523612744578; Fri, 13 Apr 2018 02:45:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523612744; cv=none; d=google.com; s=arc-20160816; b=zO7PVeqQkKDKncqqL2HupJwx0L3zAuZV7ylMYq/iWXLzBGwbyl28eUBDz2UT9w4H5C BFfTv14rFvtJijP45//5tqLOXNnQxraeEKTE3QO8DLoyDzaaV6jiOrU6Jzh2TS8WWsQJ /HtLQJLy037H1C2knvjkzrvxhUlgLwjJfukO5PYmplLDmu1y0Z1TxfuvhoqO/Qg2gvMI sODPnArdxnyTV/Obg5TFTGbumpTifSH4fKc5JiZ2GtbwtwkxqGDd0920WeicYD4dpX8j wk2abuoFShc/UdH61Ui6FdT8xreFuTory3+kzzaX0OkJt8S9tPLoF5t3Tf1n13dBggzI jTCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type :content-transfer-encoding:mime-version:in-reply-to:user-agent :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=xetDyh42S5FzY0jisa81BVu/HTfBgGkmiltLpNrplxg=; b=LBxVGE8uBVcAlczt3mJwpx6zEoEWAcGgJevOi1X/3lH9Z9yuz7tzYGEBKuCo+WA0ah MFdJp7yy/rTVwRRRbELFkYd7n/d24yD+QDYAbaMoiHMW0bdEpIKuqMq7dm7axWXrH35l 2An5U4lkXbgQToAGddqSESuEXveWP+UmDgv3/TiiG7RhPUFYu9vfk24G6dUbB6FqKUPz ep8daDMy6QwdAN2btOvzvQFj7+/R7ihg2+/vv452JVzW1s1cYv4WtCoLWTv0y8BftHr+ xEcuZPCmgGRwHIfQKGk0QtoJ4vSNf1DIyeRIwG7FeZ6gs9raX5o673dlKUVOCkWi54J5 qwiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=AWMMEZ3S; 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=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q11-v6si5297879pli.667.2018.04.13.02.45.30; Fri, 13 Apr 2018 02:45:44 -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=@samsung.com header.s=mail20170921 header.b=AWMMEZ3S; 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=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754123AbeDMJ3G (ORCPT + 99 others); Fri, 13 Apr 2018 05:29:06 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:16877 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753588AbeDMJ3E (ORCPT ); Fri, 13 Apr 2018 05:29:04 -0400 Received: from epcas2p2.samsung.com (unknown [182.195.41.54]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20180413092902epoutp0219f0f0b528cf6d3231e371cb654aff6b~k9M6y1f6m0993009930epoutp02O; Fri, 13 Apr 2018 09:29:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20180413092902epoutp0219f0f0b528cf6d3231e371cb654aff6b~k9M6y1f6m0993009930epoutp02O DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1523611742; bh=xetDyh42S5FzY0jisa81BVu/HTfBgGkmiltLpNrplxg=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=AWMMEZ3SselM/tSbQed7YKPWmSK3VHz/FWNIAJ77sMuAGrDux8iQRqUjkglEL+gNK ISryy94UE0DDulGWny5trK0flBtWjyhOCvp3gHrPODfXCFB4m6SwUtR6MpKTKeXcUf gI4kBCR9nhya/QeeogYwpTsLJyKOxF6x7k4Zwhn8= Received: from epsmges2p4.samsung.com (unknown [182.195.42.72]) by epcas2p3.samsung.com (KnoxPortal) with ESMTP id 20180413092902epcas2p3e533458574f366f705fc70984931fa8a~k9M6iq8y13175731757epcas2p31; Fri, 13 Apr 2018 09:29:02 +0000 (GMT) Received: from epcas2p1.samsung.com ( [182.195.41.53]) by epsmges2p4.samsung.com (Symantec Messaging Gateway) with SMTP id B2.2F.04082.E5870DA5; Fri, 13 Apr 2018 18:29:02 +0900 (KST) Received: from epsmgms2p2new.samsung.com (unknown [182.195.42.143]) by epcas2p4.samsung.com (KnoxPortal) with ESMTP id 20180413092901epcas2p43245301152a01c782620f0ab95b2a692~k9M6GA1Ok2999329993epcas2p4w; Fri, 13 Apr 2018 09:29:01 +0000 (GMT) X-AuditID: b6c32a48-8c1ff70000000ff2-93-5ad0785ea8dc Received: from epmmp2 ( [203.254.227.17]) by epsmgms2p2new.samsung.com (Symantec Messaging Gateway) with SMTP id 71.D8.03827.D5870DA5; Fri, 13 Apr 2018 18:29:01 +0900 (KST) Received: from amdc3058.localnet ([106.120.53.102]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0P7400LHZAC92W40@mmp2.samsung.com>; Fri, 13 Apr 2018 18:29:01 +0900 (KST) From: Bartlomiej Zolnierkiewicz To: Daniel Lezcano Cc: Zhang Rui , Eduardo Valentin , Linus Torvalds , LKML , Linux PM list , "Li, Philip" Subject: Re: [GIT PULL] Thermal management updates for v4.17-rc1 Date: Fri, 13 Apr 2018 11:28:56 +0200 Message-id: <4212243.RcCUWlsaar@amdc3058> User-Agent: KMail/4.13.3 (Linux/3.13.0-96-generic; KDE/4.13.3; x86_64; ; ) In-reply-to: <16cbc915-ad89-7bab-c644-8086cfef082f@linaro.org> MIME-version: 1.0 Content-transfer-encoding: quoted-printable Content-type: text/plain; charset="utf-8" X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrNIsWRmVeSWpSXmKPExsWy7bCmqW5cxYUog4e7eCzmfZa1mH/lGqvF 5V1z2Cw+9x5htLh06CKTxZOHfWwWj/resjuwe+ycdZfdY/Gel0wed67tYfM4MeM3i8fnTXIB rFFcNimpOZllqUX6dglcGe2tHawF16UrZkyYytjAeF60i5GTQ0LAROLLtY+sXYxcHEICOxgl LtyZwAjhfGeU+HjtPztMVXcvTGIDo8SHC83MEM5XRonGeR+YQarYBKwkJravYgSxRQT0JBrf tzGB2MwCXxglHt7kB7GFBRwkGjZcYwGxWQRUJU6dmgDUy8HBK6ApcfYOL0hYVMBLYsu+drBW TgE7idcP34GN5BUQlPgx+R4LxEhtiSfvLrBC2JoSL75MYgG5R0LgCJvE4a07WCCudpE4PesI K4QtLPHq+Baob6Qlnq3ayAjR0Mwo8W3HHmaIxARGiT3rhSBsa4nDxy9CbeCT6Dj8lx3kUAkB XomONqgSD4mpy5dBzXeUeLFgEjskUG4wSkxfcJhlAqPsLCSHz0Jy+Cwkhy9gZF7FKJZaUJyb nlpsVGCiV5yYW1yal66XnJ+7iRGcJLQ8djAeOOdziFGAg1GJh1eh8nyUEGtiWXFl7iFGCQ5m JRHemwUXooR4UxIrq1KL8uOLSnNSiw8xSnOwKInzNvieiRISSE8sSc1OTS1ILYLJMnFwSjUw nn1vWMXtXrVbgsGxefZeXrbV1kUK0377XRacO61A9fhSw/r8fPe4uMKq7w9+Sh5R8Mjg4Dim OHfORf0/3ycHatv+3PpUoy1cSD9jiQ/PrbRJ0+51PVXmXyzm1BZx7v+vrp5mVr+/6UGnn1ie UNC9eK83Je2szbFAm/lVZvmt3T+kO9quiC1WYinOSDTUYi4qTgQA0LLjwQ4DAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrELMWRmVeSWpSXmKPExsVy+t9jQd3YigtRBtM+aFrM+yxrMf/KNVaL y7vmsFl87j3CaHHp0EUmiycP+9gsHvW9ZXdg99g56y67x+I9L5k87lzbw+ZxYsZvFo/Pm+QC WKO4bFJSczLLUov07RK4MtpbO1gLrktXzJgwlbGB8bxoFyMnh4SAiUR37wTGLkYuDiGBdYwS px5Ng3K+Mkq0LD3PClLFJmAlMbF9FSOILSKgJ9H4vo0JpIhZ4AujxOIDe8CKhAUcJBo2XGMB sVkEVCVOnZrA3MXIwcEroClx9g4vSFhUwEtiy752JhCbU8BO4vXDd1DLmhglvk2YCzaHV0BQ 4sfke2BzmAW0JZ68u8AKModZQF1iypTcCYz8s5BUzUJSNQuhagEj8ypGydSC4tz03GKjAqO8 1HK94sTc4tK8dL3k/NxNjMCQ3nZYq38H4+Ml8YcYBTgYlXh4FSrPRwmxJpYVV+YeYpTgYFYS 4b1ZcCFKiDclsbIqtSg/vqg0J7X4EKM0B4uSOC9//rFIIYH0xJLU7NTUgtQimCwTB6dUA6PR 4oaVnfYXO0/MmzVhRe7d8w+kp4ZK1Kx9+91b+JqAWbI1xyMPEzWTdSddXype+qxfbclYJXee wfPe8cDjRre4Ps5adyz56UweVYOzuzJuME9hSHsWY3f0fW/uCqFrFtWHT66IF2aY9zv/RfC9 Zefln9Sk1dya8oi7pf29xsMO7riDi98zX16kxFKckWioxVxUnAgAdoHHzWUCAAA= X-CMS-MailID: 20180413092901epcas2p43245301152a01c782620f0ab95b2a692 X-Msg-Generator: CA CMS-TYPE: 102P X-CMS-RootMailID: 20180413092901epcas2p43245301152a01c782620f0ab95b2a692 X-RootMTR: 20180413092901epcas2p43245301152a01c782620f0ab95b2a692 References: <1523436077.16235.5.camel@intel.com> <3546651.LUmDXQgY88@amdc3058> <16cbc915-ad89-7bab-c644-8086cfef082f@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Friday, April 13, 2018 11:19:40 AM Daniel Lezcano wrote: > 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 =E5=9B=9B, 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 uninitiali= zed > >>>>>> 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 cov= er > >>>>> for unexpected cal_type, the right way of fixing this is to rew= rite > >>>>> 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 w= hich I > >>>> will send out soon. > >>>> 2. you can prepare another pull request containing the thermal-s= oc > >>>> materials except the exynos fixes > >>>> 3. exynos fixes with the problem solved can be queued for -rc2 o= r > >>>> 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', over= ride > >> it at init time to '25' if it is a 5440. And then the variable 'te= mp' > >> and 'temp_code' get this value in the default case. > >=20 > > It is okay to return 0 because this code-path (the default one) wil= l be > > never hit by the driver (probe makes sure of it) - the default case= is > > here is just to silence compilation errors.. >=20 > 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 de= ad > branches to please gcc? >=20 > if (data->cal_type =3D=3D TYPE_TWO_POINT_TRIMMING) { > =09return ...; > } >=20 > return ...; I'm not the one that added this switch statement (it has been there sin= ce 2011) and I would be happy to remove it. However could we please defer= this to v4.17 and merge the current set of Exynos thermal fixes/cleanup= s (they simplify the driver a lot and make ground for future changes)? Best regards, -- Bartlomiej Zolnierkiewicz Samsung R&D Institute Poland Samsung Electronics