Received: by 10.192.165.156 with SMTP id m28csp551590imm; Fri, 13 Apr 2018 03:58:06 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/bdL4i4TCwB2ZJA80Sw7sYHzJoHeXpPXrf7BQ7pj4U1dlnaJiJBLkZSk3AckY3VJLBGtlJ X-Received: by 2002:a17:902:6ac1:: with SMTP id i1-v6mr4816794plt.152.1523617086068; Fri, 13 Apr 2018 03:58:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523617086; cv=none; d=google.com; s=arc-20160816; b=xSjkZTR4yfpzZoiPEdCR/JcVzxJyPNOfAw1o9S7MiL9aos0TiGDtQ6ZCpYQSEqO9oB 4QYcORPsIFshAZVjo3AF+ZVFZdmbLQDOEoyYuqgL64C9AfYJ+wcSD1jJe/oQO4lD9T4S qS/KUKITN66xb2Oj04DUXqKR3gAdiF4Uby1+Yg6Oj5uiJO5+Gr36wejrOLFcmSye+OJM fSHt1ML9zkmnPq5bZw7POBy33nKrALoXdi0wGksgZjl2VjxkEvIWNejvVVxGIjGSLyga 5PVYot/1+Mxxn1NfTvvq6sxuOLsSeT1h80cs8uazK0nD1mFuVIiFcfnZAxkC6dWyarCs AsSQ== 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=6Zae1D6CQkHxxpEQxEWSOTMpJe0rbg1p47urf/XYDiA=; b=XrcWnrLfsJstW4q/kx/Q1gxxsYvIIq3uT0KSM4G62MfjDQeWT3cEQyRGcFrvOuHTHL D3dDPBmAomjGAjJDq2XyBR+wOaouQny5qbOlmXsHGq9zEdnZsYy/eTBey86suPUASGjI sS902PCe2VfhpYkFAkr4PkIjEHbuykA8ULYN1tDjGCJQMi2yHnfi9kgBc9oJzqKY4N/y CkKOGVbmB92IQjpENZR75alG235PvCYYapm4zBQlKe3+TUxVKOnhDR9qVn8S8eLRZECR TioydyA/Ybhmip89N3TNCqJCyYCESa2Mhw5H9wB5hwrIrpvZOMcZhaXHTisA96HoJbJu ccaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=lP1cu4CL; 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 q7si3867902pgn.372.2018.04.13.03.57.52; Fri, 13 Apr 2018 03:58:06 -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=lP1cu4CL; 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 S1754150AbeDMKlZ (ORCPT + 99 others); Fri, 13 Apr 2018 06:41:25 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:51847 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751776AbeDMKlX (ORCPT ); Fri, 13 Apr 2018 06:41:23 -0400 Received: from epcas1p3.samsung.com (unknown [182.195.41.47]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20180413104121epoutp01d046da9750cd99590ca6c25adb10f567~k_MDhlAAR1229312293epoutp01D; Fri, 13 Apr 2018 10:41:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20180413104121epoutp01d046da9750cd99590ca6c25adb10f567~k_MDhlAAR1229312293epoutp01D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1523616081; bh=6Zae1D6CQkHxxpEQxEWSOTMpJe0rbg1p47urf/XYDiA=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=lP1cu4CL6ZkLY9cOLfpfK6VxSXoH82io9UryIt/yBs5ujy5DcMyeG4BBvt3u++6mC KHzBSofCUhiVcxonV6Oj4FW0bGINzhhSqudC9kdA+9P1u3qVM+QJlhCSsEDYkrUS6W MXSVQBbLBseSl1bw7OAuxMfXPHcNoGwfr8sdSjHQ= Received: from epsmges1p2.samsung.com (unknown [182.195.42.54]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20180413104121epcas1p24e1bb9feb82cf6ecce8ec9f7f3981a88~k_MDaW-Lo2577025770epcas1p2K; Fri, 13 Apr 2018 10:41:21 +0000 (GMT) Received: from epcas1p4.samsung.com ( [182.195.41.48]) by epsmges1p2.samsung.com (Symantec Messaging Gateway) with SMTP id D2.24.04034.15980DA5; Fri, 13 Apr 2018 19:41:21 +0900 (KST) Received: from epsmgms2p1new.samsung.com (unknown [182.195.42.142]) by epcas1p3.samsung.com (KnoxPortal) with ESMTP id 20180413104120epcas1p319b9e78b025cb68f810f047c67a48362~k_MDNPamd1012510125epcas1p3a; Fri, 13 Apr 2018 10:41:20 +0000 (GMT) X-AuditID: b6c32a36-f57ff70000000fc2-85-5ad089519ee5 Received: from epmmp2 ( [203.254.227.17]) by epsmgms2p1new.samsung.com (Symantec Messaging Gateway) with SMTP id AD.8C.03849.05980DA5; Fri, 13 Apr 2018 19:41:20 +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 <0P7400M4ADOVZE50@mmp2.samsung.com>; Fri, 13 Apr 2018 19:41:20 +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 12:41:18 +0200 Message-id: <10298074.ogKH1ypqfx@amdc3058> User-Agent: KMail/4.13.3 (Linux/3.13.0-96-generic; KDE/4.13.3; x86_64; ; ) In-reply-to: <3b41052a-233d-9992-223a-d16f48295905@linaro.org> MIME-version: 1.0 Content-transfer-encoding: 7Bit Content-type: text/plain; charset="us-ascii" X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrBIsWRmVeSWpSXmKPExsWy7bCmgW5g54UogzdnWS3mfZa1mH/lGqvF 5V1z2Cw+9x5htLh06CKTxZOHfWwWj/resjuwe+ycdZfdY/Gel0wed67tYfM4MeM3i8fnTXIB rFFcNimpOZllqUX6dglcGUtebWYu2M9T8e9gI2sD42POLkYODgkBE4k3x/O6GLk4hAR2MEpc u9vPCOF8Z5RY9fEuSxcjJ1jRmtf/mSASGxgl3u6aygbhfGWUmPN0BitIFZuAlcTE9lWMILaI gJ5E4/s2JhCbWeALo8TDm/wgtrCAg0TDhmtgU1kEVCX+HtoGZvMKaEmc/bEebI6ogJfEln3t YL2cAnYSR+a/hqoRlPgx+R4LxEx5iX37p7JC2DoSZ4+tY4S4dA+bxPUnMRC2i8S32Y2sELaw xKvjW9ghXpaWuHTUFuR+CYFmRolvO/YwQ9RMYJTYs14IwraWOHz8ItR8Pol3X3tYIXp5JTra oEo8JH6s3sMGYTtKLD7VDFYuJHCDUWLLxMgJjLKzkFw9C8nVs5BcvYCReRWjWGpBcW56arFh gZFecWJucWleul5yfu4mRnB60DLbwbjonM8hRgEORiUeXoXK81FCrIllxZW5hxglOJiVRHhv FlyIEuJNSaysSi3Kjy8qzUktPsQozcGiJM771OdMlJBAemJJanZqakFqEUyWiYNTqoFRsbrw N+/Wk24B2zuv3RNI2OKTxpJatahihUjEuv7tHFZSy7bsDorJqGZc/mn3x+3aEcvMZ6cfX5Rz poz3aO/xw8btmpIR+6evu12We+xy9CfN/fEr95zn8zraEraq6GJ02fqsz1daVnZtbi124p3u +fd53M/Al5Kekx9F7S7fVd34bMXXgHNPlFiKMxINtZiLihMBPyvaXAsDAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrKLMWRmVeSWpSXmKPExsVy+t9jQd2AzgtRBoe3GlvM+yxrMf/KNVaL y7vmsFl87j3CaHHp0EUmiycP+9gsHvW9ZXdg99g56y67x+I9L5k87lzbw+ZxYsZvFo/Pm+QC WKO4bFJSczLLUov07RK4Mpa82sxcsJ+n4t/BRtYGxsecXYycHBICJhJrXv9n6mLk4hASWMco 8ar1HDOE85VR4vC8LSwgVWwCVhIT21cxgtgiAnoSje/bwDqYBb4wSiw+sIcVJCEs4CDRsOEa WAOLgKrE30PbwGxeAS2Jsz/Wg9WICnhJbNnXzgRicwrYSRyZ/5oFYlsTo8SLxiZmiAZBiR+T 74E1MwvIS+zbP5UVwtaSWL/zONMERv5ZSMpmISmbhaRsASPzKkbJ1ILi3PTcYqMCw7zUcr3i xNzi0rx0veT83E2MwMDedlirbwfj/SXxhxgFOBiVeHgVKs9HCbEmlhVX5h5ilOBgVhLhvVlw IUqINyWxsiq1KD++qDQntfgQozQHi5I47+28Y5FCAumJJanZqakFqUUwWSYOTqkGRlXH49ot b+o8n1ZoBgr9i9uVvLuy8eYrf39hHaflF5JVWhbLhe22Nwi++0H7TFuqxe1UyaSf/F1dz15w tCZ9rE/7wT3t1G7ZC1p3p/S4S+wWenLSzOImx44Hwbt9Y5480/u7//3MzKUBPbO5/svnmD/Z o3bjXOIE+VjeE3GFVgFOta8CHR53K7EUZyQaajEXFScCAEJDRD1oAgAA X-CMS-MailID: 20180413104120epcas1p319b9e78b025cb68f810f047c67a48362 X-Msg-Generator: CA CMS-TYPE: 101P X-CMS-RootMailID: 20180413104120epcas1p319b9e78b025cb68f810f047c67a48362 X-RootMTR: 20180413104120epcas1p319b9e78b025cb68f810f047c67a48362 References: <1523436077.16235.5.camel@intel.com> <4212243.RcCUWlsaar@amdc3058> <3b41052a-233d-9992-223a-d16f48295905@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 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? Best regards, -- Bartlomiej Zolnierkiewicz Samsung R&D Institute Poland Samsung Electronics