Received: by 10.192.165.156 with SMTP id m28csp569306imm; Fri, 13 Apr 2018 04:15:23 -0700 (PDT) X-Google-Smtp-Source: AIpwx49HsiMbqytmLFRvh+BiBiF7JI+Lcmv4NnxTZHWxlOmns4lqp07kfDPZDasDvINQwKVfmxv/ X-Received: by 2002:a17:902:aa98:: with SMTP id d24-v6mr4811491plr.220.1523618123704; Fri, 13 Apr 2018 04:15:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523618123; cv=none; d=google.com; s=arc-20160816; b=eJFHUCaMaC/xmNrA6YzdggW5gUkzyjuUnTCOSpU8jL2X4PIwdCzneyi3t4BU9GDv7q wDphSRDMR3ihSneWXovyAgWY2L2kYm3RnuOH5ay9QoVEpYB7nOIJWgY0cv2ib63VCGDN 5j6K9qcFLdfgpdLgvJQJNGMVKKl1GM4347NBNFbPVs02NeikKDj/OyGAtmcbLVUEzccW tmyGDz4DSzXhulemb2iriErbBV7PrppnvBjzdWQCBA16x1s6f3Ofmlr0+TIAsI6qBeSs ttDI9/1xdCXT2aWhyuBWFWC7t3gpCXjMCsPbBiBwUKi+o/FbEONJQOaEbsV/5ZDmU+0g b2Zw== 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=KarkkFT1X5+tLojTB0bzkKHxWoH8DzlOQfPdp/rcHJk=; b=rHNgqQN0jleIh7VvUAfJgnL/XvjgcpOBzbV3x6UKIqAIIeHx2Br62ZvVBu/lWSlRj/ YJK9hvRTp9tStYeQHlr+KlvX6dEoH//1UwlHaeW9IgLVTh+rgmVchip3FjQEImS0T4R5 Tvqce83CFBh3aNj8+BqhQbcZCi8H4TVAs0PPNwj+C+2iQMoFlDnf5ObABjo2hdJhn+Zg +EknMHRZteoVdQ1qHij0nric/81dZpH1q8nE6uj31LnsgCshR3aPtnCJp+oxR2v08x8a OgmV3WAEHnydQ0D+bJSnN+YdzzoKUOey/mcze6uxCmWq7vS3UNg96OnDpBYcY+x/XenX vVug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=vH5ROAIl; 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 p26-v6si5202514pli.534.2018.04.13.04.15.09; Fri, 13 Apr 2018 04:15:23 -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=vH5ROAIl; 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 S1754264AbeDMLMr (ORCPT + 99 others); Fri, 13 Apr 2018 07:12:47 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:60777 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753602AbeDMLMp (ORCPT ); Fri, 13 Apr 2018 07:12:45 -0400 Received: from epcas1p1.samsung.com (unknown [182.195.41.45]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20180413111243epoutp01329d5003900972529543c59b601e41f0~k_ncIsx-22946229462epoutp01R; Fri, 13 Apr 2018 11:12:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20180413111243epoutp01329d5003900972529543c59b601e41f0~k_ncIsx-22946229462epoutp01R DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1523617963; bh=KarkkFT1X5+tLojTB0bzkKHxWoH8DzlOQfPdp/rcHJk=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=vH5ROAIlxVswbJP6mIflf/ZYbzZkbO4ojdz40SScuN6qGZhMNW+wzl5ReI7bXq1x3 DRC1BxHuthya0tOog7IFwRpPzVEW1uiDqCBl0JDUAjVsqsBnU8yb8aGfxrxr5AD6PA jSWXrwjkH6aJuVyoT/y+QVYsKQ955u25pcMi+2Hg= Received: from epsmges1p1.samsung.com (unknown [182.195.42.53]) by epcas1p1.samsung.com (KnoxPortal) with ESMTP id 20180413111242epcas1p1812a5209342b0936051c705de4c27b84~k_nbpX1Ie0879208792epcas1p1W; Fri, 13 Apr 2018 11:12:42 +0000 (GMT) Received: from epcas1p3.samsung.com ( [182.195.41.47]) by epsmges1p1.samsung.com (Symantec Messaging Gateway) with SMTP id 14.F6.04078.AA090DA5; Fri, 13 Apr 2018 20:12:42 +0900 (KST) Received: from epsmgms2p1new.samsung.com (unknown [182.195.42.142]) by epcas1p4.samsung.com (KnoxPortal) with ESMTP id 20180413111242epcas1p4cd5ecac004dd9c1e00e1608088ff88e2~k_nba8nLS1233712337epcas1p4F; Fri, 13 Apr 2018 11:12:42 +0000 (GMT) X-AuditID: b6c32a35-151ff70000000fee-4b-5ad090aa5afe Received: from epmmp2 ( [203.254.227.17]) by epsmgms2p1new.samsung.com (Symantec Messaging Gateway) with SMTP id CF.3D.03849.AA090DA5; Fri, 13 Apr 2018 20:12:42 +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 <0P740034CF54XX30@mmp2.samsung.com>; Fri, 13 Apr 2018 20:12:42 +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 13:12:39 +0200 Message-id: <2093381.eDLEWQi9DB@amdc3058> User-Agent: KMail/4.13.3 (Linux/3.13.0-96-generic; KDE/4.13.3; x86_64; ; ) In-reply-to: <10298074.ogKH1ypqfx@amdc3058> MIME-version: 1.0 Content-transfer-encoding: 7Bit Content-type: text/plain; charset="us-ascii" X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrFIsWRmVeSWpSXmKPExsWy7bCmvu6qCReiDJaekbeY91nWYv6Va6wW l3fNYbP43HuE0eLSoYtMFk8e9rFZPOp7y+7A7rFz1l12j8V7XjJ53Lm2h83jxIzfLB6fN8kF sEZx2aSk5mSWpRbp2yVwZRzpe8lU0CFQcW/fNpYGxh08XYycHBICJhL7p31l72Lk4hAS2MEo MfnraTYI5zujxJfZ35hgqqb/PcsIkdjAKDHx5AV2kISQwFdGiU/fg0BsNgEriYntqxhBbBEB PYnG921gzcwCXxglHt7kB7GFBRwkGjZcYwGxWQRUJd6v62UFsXkFNCV+7joO1isq4CWxZV87 WC+ngLbEv68LoGoEJX5MvscCMVNeYt/+qawQto7E2WPrwI6TEDjAJrHm5gZ2iKtdJN78fMcC YQtLvDq+BSjOAWRLS1w6agtR38wo8W3HHmaImgmMEnvWC0HY1hKHj1+EWsAn8e5rDytEL69E RxtUiYfE/J1XoMY7SnRfvQ0NoJuMEj+v7WGdwCg7C8nds5DcPQvJ3QsYmVcxiqUWFOempxYb FhjqFSfmFpfmpesl5+duYgSnCC3THYxTzvkcYhTgYFTi4VWoPB8lxJpYVlyZe4hRgoNZSYT3 ZsGFKCHelMTKqtSi/Pii0pzU4kOM0hwsSuK8T33ORAkJpCeWpGanphakFsFkmTg4pRoYfR1j zk26up/Nim3Pl+tSZ2e1plt6rNC/u2zet2TJirLfWqk5nSm1t8S275iU8fFowxq1SfdnqX9N UuM/urR6TaFYfmnnxXOLPMwYO/bZlYR1cm7WfXLXyYht9aGIw88/TiiNZm244frOuPcTR4BY 6/TomZ0sZV1ay9WSQu5obzYyKHS/qpmkxFKckWioxVxUnAgAfZ5xLQ0DAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrCLMWRmVeSWpSXmKPExsVy+t9jQd1VEy5EGRy9wWcx77Osxfwr11gt Lu+aw2bxufcIo8WlQxeZLJ487GOzeNT3lt2B3WPnrLvsHov3vGTyuHNtD5vHiRm/WTw+b5IL YI3isklJzcksSy3St0vgyjjS95KpoEOg4t6+bSwNjDt4uhg5OSQETCSm/z3LCGILCaxjlNjQ pNHFyAVkf2WU2HzoPRtIgk3ASmJi+yqwIhEBPYnG921MIEXMAl8YJRYf2MMKkhAWcJBo2HCN BcRmEVCVeL+uFyzOK6Ap8XPXcbBmUQEviS372plAbE4BbYl/XxewQmxrZZT4Pr+DEaJBUOLH 5Htgg5gF5CX27Z/KCmFrSazfeZxpAiP/LCRls5CUzUJStoCReRWjZGpBcW56brFRgWFearle cWJucWleul5yfu4mRmBYbzus1beD8f6S+EOMAhyMSjy8CpXno4RYE8uKK3MPMUpwMCuJ8N4s uBAlxJuSWFmVWpQfX1Sak1p8iFGag0VJnPd23rFIIYH0xJLU7NTUgtQimCwTB6dUA+PsI06/ /q7zMT6cIf1jV49O3N93U2wMruxnu3vmsethNz3fRXUmFSz39+VWKqz59dVWYbX0t5yZfk/m zGUqPZwt35337/pMMUbTqL0hcVu4djh5z39X68Gp7Jdo+Cvks9vssIPP5y2tfn1FfYUUmyvj u8eFL5NXW6tckF5QmNGVNv2FdkmrgJYSS3FGoqEWc1FxIgC+gXN8ZwIAAA== X-CMS-MailID: 20180413111242epcas1p4cd5ecac004dd9c1e00e1608088ff88e2 X-Msg-Generator: CA CMS-TYPE: 101P X-CMS-RootMailID: 20180413111242epcas1p4cd5ecac004dd9c1e00e1608088ff88e2 X-RootMTR: 20180413111242epcas1p4cd5ecac004dd9c1e00e1608088ff88e2 References: <1523436077.16235.5.camel@intel.com> <3b41052a-233d-9992-223a-d16f48295905@linaro.org> <10298074.ogKH1ypqfx@amdc3058> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Friday, April 13, 2018 12:41:18 PM Bartlomiej Zolnierkiewicz wrote: > On Friday, April 13, 2018 12:30:04 PM Daniel Lezcano wrote: > > On 13/04/2018 11:28, Bartlomiej Zolnierkiewicz wrote: > > > > [ ... ] > > > > >>> 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 ...; > > > > > > I'm not the one that added this switch statement (it has been there since > > > 2011) and I would be happy to remove it. > > > > Actually the switch statement was fine until the cleanup. > > I don't see how it was fine before as the driver has never used the default > case (always used TYPE_ONE_POINT_TRIMMING or TYPE_TWO_POINT_TRIMMING). > > Could you please explain this more? > > > > However could we please defer > > > this to v4.17 and merge the current set of Exynos thermal fixes/cleanups > > > (they simplify the driver a lot and make ground for future changes)? > > > > Regarding the latest comment, this can be fixed properly by 'return' (or > > whatever you want which does not get around of gcc warnings). > > Do you mean that you want the patch with switch statement removal? > > Is incremental fix OK or do you want something else? Danial has already posted it, I hope the fix is fine with you. Also sorry for the delay with handling issue - I was on holiday last two days and for some reason I was under (wrong) impression that the previous fix has been in thermal tree (so I was quite surprised today reading this mail thread). Best regards, -- Bartlomiej Zolnierkiewicz Samsung R&D Institute Poland Samsung Electronics