Received: by 10.192.165.156 with SMTP id m28csp576789imm; Fri, 13 Apr 2018 04:23:28 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+K3XRvOIrckH5O2OcloFLk5V76au7wCUl42jZhENoDjsTS+xyf2pvMxcb6NEBhsQXQ71h8 X-Received: by 2002:a17:902:bb81:: with SMTP id m1-v6mr4854292pls.71.1523618608945; Fri, 13 Apr 2018 04:23:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523618608; cv=none; d=google.com; s=arc-20160816; b=Iqazs0JtlJ2Vp6ym9cI5dqCvmBDqKTJZzimOuBs7N1f+/ffwKB2Voa2s0lGosSIOh6 J8uiTDRzDvCQ4C2xFDXzyyDWpWJ0P357KAOycNWkphSwyFlEVG9lcpKxM8nmhOE0uRZ9 kf3pjScB1aeB7rEKoI488nz2ZKOapLKGHs+0LtL0rIxhQKI2fePnbaJxtaImhIEZ1Des LE4Huk4srS4L0Ew+pI6vIrQTIkzZOrB091fofIjYpIJt4GuJEkYgRu5l5XjMJ11q+rWs 9cxRnNhr8gW2+K/Oc82h+2Sqb1srCY2uG+cyu9NuGM2x8z9N6MnmpbO7ppm5yG66w9MN GnAA== 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=fhnZd125QjH93E96xaPlpFE8gveQqA7S53GtBYxZCTc=; b=UmCo6RjzDiK4RQI4jFXwP+zcbWkolRkHssF8remjGZsvq0WTRlNcG7JMe9X9IlQMsg e+VYs0D8o+yFIbZS9PwVYPj6RkVgE4XuqS09gA2Dz5mdnQbBNdMFkOtTgW4Bn6AqgWuV +hrNgFaUYwtOPAoEeVOGeBSYwsdgu37A22NZxQwqcbevjJ2h/5+fgEw2K2kpFM0lsy4R S2fwZqPogsTH0x8ktX7O1DJvmmLErVvsUY+sRATYpaCiBhVbk4qAQ0p0vLyNa9CkV0fc IWMkW837GX68oFrrPVHqptJ2ntv7a2x9iHr8BErTxnEahkxB1KXOtiRoaRX3+wEQkTb2 omXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=Nl0PLHt3; 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 n189si4372641pfn.356.2018.04.13.04.23.14; Fri, 13 Apr 2018 04:23:28 -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=Nl0PLHt3; 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 S1754349AbeDMLVx (ORCPT + 99 others); Fri, 13 Apr 2018 07:21:53 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:54533 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753981AbeDMLVv (ORCPT ); Fri, 13 Apr 2018 07:21:51 -0400 Received: from epcas1p4.samsung.com (unknown [182.195.41.48]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20180413112149epoutp02053cf19a1487c050cd44c6b1f8ec0508~k_vYrotJR1594215942epoutp02F; Fri, 13 Apr 2018 11:21:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20180413112149epoutp02053cf19a1487c050cd44c6b1f8ec0508~k_vYrotJR1594215942epoutp02F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1523618509; bh=fhnZd125QjH93E96xaPlpFE8gveQqA7S53GtBYxZCTc=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=Nl0PLHt3j7tl0BEM1JuiQecivlTc0+6tA04W3hxCS19n5tpIwRHSScCZ1Dgs0QO8U U6Cp6QZ29c4LcDxMciWpHBCLJTNrza6AmJYhpy+eQoEoMlusIp3Nt5RFWWPoIsXBSn GxN7xTHDUE+PgZTo33JPxguAkw6+YhtSK3IB2E2Q= Received: from epsmges1p4.samsung.com (unknown [182.195.42.56]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20180413112149epcas1p2f8077d97b283e8a418a5fab5529eee10~k_vYj8eQ92317823178epcas1p2R; Fri, 13 Apr 2018 11:21:49 +0000 (GMT) Received: from epcas1p2.samsung.com ( [182.195.41.46]) by epsmges1p4.samsung.com (Symantec Messaging Gateway) with SMTP id 50.41.04226.CC290DA5; Fri, 13 Apr 2018 20:21:49 +0900 (KST) Received: from epsmgms2p1new.samsung.com (unknown [182.195.42.142]) by epcas1p3.samsung.com (KnoxPortal) with ESMTP id 20180413112148epcas1p3f657cb50af4151d41f8c404e6b0d5fab~k_vYAqRP_2529525295epcas1p3o; Fri, 13 Apr 2018 11:21:48 +0000 (GMT) X-AuditID: b6c32a38-d73ff70000001082-60-5ad092cc3ed1 Received: from epmmp1.local.host ( [203.254.227.16]) by epsmgms2p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 5F.6D.03849.CC290DA5; Fri, 13 Apr 2018 20:21:48 +0900 (KST) Received: from amdc3058.localnet ([106.120.53.102]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0P74001UYFKAY450@mmp1.samsung.com>; Fri, 13 Apr 2018 20:21:48 +0900 (KST) From: Bartlomiej Zolnierkiewicz To: Daniel Lezcano , Eduardo Valentin Cc: Zhang Rui , 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:21:45 +0200 Message-id: <5312146.KITRp36PIx@amdc3058> User-Agent: KMail/4.13.3 (Linux/3.13.0-96-generic; KDE/4.13.3; x86_64; ; ) In-reply-to: <2093381.eDLEWQi9DB@amdc3058> MIME-version: 1.0 Content-transfer-encoding: 7Bit Content-type: text/plain; charset="us-ascii" X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrBIsWRmVeSWpSXmKPExsWy7bCmnu7ZSReiDLptLOZ9lrWYf+Uaq8Xl XXPYLD73HmG0uHToIpPFk4d9bBaP+t6yO7B77Jx1l91j8Z6XTB53ru1h8zgx4zeLx+dNcgGs UVw2Kak5mWWpRfp2CVwZGxurC5YJVczZN4O5gfEfbxcjJ4eEgInE0kt7mbsYuTiEBHYwSjQf /swK4XxnlJi0aQkrTNW3he8ZIRK7GSWOzN7LBOF8ZZQ4fP4BG0gVm4CVxMT2VYwgtohAhMTB tRBFzAKnGCUmLp/GDpIQFnCQaNhwjQXEZhFQlZiyfBUziM0roClxY+8hsEGiAl4SW/a1M4HY nAJaEj+erGSBqBGU+DH5HpjNLCAvsW//VFYIW0fi7LF1YOdJCBxgk1jaP4ER4m4XicPrWlkg bGGJV8e3AB3BAWRLS1w6agtR38wo8W3HHmaImgmMEnvWC0HY1hKHj1+EWsAn8e5rDytEL69E RxtUiYdEy5JNTBBhR4mdF8C2CgkcZpRY8cF6AqPsLCRXz0Jy9SwkVy9gZF7FKJZaUJybnlps WGCiV5yYW1yal66XnJ+7iRGcHrQsdjDuOedziFGAg1GJh1eh8nyUEGtiWXFl7iFGCQ5mJRHe mwUXooR4UxIrq1KL8uOLSnNSiw8xSnOwKInzPvU5EyUkkJ5YkpqdmlqQWgSTZeLglGpgFIzY k6v7e2va+uSjv97YMP1sVxCaUy007VXLKXPfgwLb9pnHSjX6C27ftjTKa8nCCJlvd8tfz+wp WL/d5Xy1+7Z4g8+KnI+k7k+b9OjZi8dHLc4nFj2bffB4S5XVL9OJNdJT237tahN6Z2yZ2s3U Ilbx9MLtE8p7zGda5yxLPdbLJHBctOJikRJLcUaioRZzUXEiAOW5mHALAwAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrMLMWRmVeSWpSXmKPExsVy+t9jAd0zky5EGRy6JGIx77Osxfwr11gt Lu+aw2bxufcIo8WlQxeZLJ487GOzeNT3lt2B3WPnrLvsHov3vGTyuHNtD5vHiRm/WTw+b5IL YI3isklJzcksSy3St0vgytjYWF2wTKhizr4ZzA2M/3i7GDk5JARMJL4tfM/YxcjFISSwk1Hi yKL5TBDOV0aJrpnnmECq2ASsJCa2r2IEsUUEIiT23JkK1sEscIZRYs/aR+wgCWEBB4mGDddY QGwWAVWJKctXMYPYvAKaEjf2HmIDsUUFvCS27GsHG8opoCXx48lKsHohgXyJS1enM0HUC0r8 mHwPLM4sIC+xb/9UVghbS2L9zuNMExj5ZyEpm4WkbBaSsgWMzKsYJVMLinPTc4uNCgzzUsv1 ihNzi0vz0vWS83M3MQKDetthrb4djPeXxB9iFOBgVOLhVag8HyXEmlhWXJl7iFGCg1lJhPdm wYUoId6UxMqq1KL8+KLSnNTiQ4zSHCxK4ry3845FCgmkJ5akZqemFqQWwWSZODilGhiFZXJK 7tfwN57PvnTc+mzWQam7O7jrLfY4SRRZ3vqyc9b7O6tuf9KZPU3xwf+V0T2RTtfag6S1zvJz CjQVSzD1/biyeW3vNV4jxlN6Bhfyey3n5AsnS01JEH9TMZPXntH/zDN396YrCxa8SIrxc3q9 cVtZ5+37T5Yl+y0y2S8+te9ObsK8G3uVWIozEg21mIuKEwEM08jUZgIAAA== X-CMS-MailID: 20180413112148epcas1p3f657cb50af4151d41f8c404e6b0d5fab X-Msg-Generator: CA CMS-TYPE: 101P X-CMS-RootMailID: 20180413112148epcas1p3f657cb50af4151d41f8c404e6b0d5fab X-RootMTR: 20180413112148epcas1p3f657cb50af4151d41f8c404e6b0d5fab References: <1523436077.16235.5.camel@intel.com> <10298074.ogKH1ypqfx@amdc3058> <2093381.eDLEWQi9DB@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 01:12:39 PM Bartlomiej Zolnierkiewicz wrote: > 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. should have been: Eduardo: Daniel has already posted it, I hope the fix is fine with you. (& sorry for the typo) > 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