From patchwork Thu Apr 26 11:51:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 10365847 X-Patchwork-Delegate: eduardo.valentin@ti.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 540E7602DC for ; Thu, 26 Apr 2018 11:56:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 44F5D28EA1 for ; Thu, 26 Apr 2018 11:56:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 39BDD28EBD; Thu, 26 Apr 2018 11:56:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AEDDF28EA1 for ; Thu, 26 Apr 2018 11:56:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756227AbeDZL4b (ORCPT ); Thu, 26 Apr 2018 07:56:31 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:48648 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755433AbeDZLwS (ORCPT ); Thu, 26 Apr 2018 07:52:18 -0400 Received: from epcas1p4.samsung.com (unknown [182.195.41.48]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20180426115216epoutp02cc6f4b12b5683f8a42eab6a33e4e6aa7~o_iseQu1f1528215282epoutp02w; Thu, 26 Apr 2018 11:52:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20180426115216epoutp02cc6f4b12b5683f8a42eab6a33e4e6aa7~o_iseQu1f1528215282epoutp02w DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1524743537; bh=PMf2lVdSz0/aJ/cVB9qBFPzS8UzguQUE9y4qVeUwH18=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=kVp+azLQTe6zgPS8XA8ZLf63/9e+ys5POu6fzm9x500nyt6flcQgY9fQ0sQo51ns4 J61LzEnbcWabHhU5c0D5Cd77Cq2uqY1hmRy+cTcilDbGW60tFeJO2QY+Ab0ln/gH/1 WbZkPLv7NpqwABn62miQrV0Yu0UY+0C3lFwrjYOY= Received: from epsmges1p2.samsung.com (unknown [182.195.42.54]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20180426115216epcas1p248379558e3488f943907550b885fe660~o_isWcGif2825628256epcas1p2j; Thu, 26 Apr 2018 11:52:16 +0000 (GMT) Received: from epcas1p2.samsung.com ( [182.195.41.46]) by epsmges1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 3D.4B.04135.07DB1EA5; Thu, 26 Apr 2018 20:52:16 +0900 (KST) Received: from epsmgms2p1new.samsung.com (unknown [182.195.42.142]) by epcas1p3.samsung.com (KnoxPortal) with ESMTP id 20180426115216epcas1p3ed61f0fd8563e7ea72f3d7d17c9c039f~o_isLmb4v2302023020epcas1p3X; Thu, 26 Apr 2018 11:52:16 +0000 (GMT) X-AuditID: b6c32a36-b55ff70000001027-07-5ae1bd708f43 Received: from epmmp2 ( [203.254.227.17]) by epsmgms2p1new.samsung.com (Symantec Messaging Gateway) with SMTP id E8.8C.03822.07DB1EA5; Thu, 26 Apr 2018 20:52:16 +0900 (KST) Received: from AMDC3058.DIGITAL.local ([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 <0P7S00GD7JMBQG00@mmp2.samsung.com>; Thu, 26 Apr 2018 20:52:16 +0900 (KST) From: Bartlomiej Zolnierkiewicz To: Eduardo Valentin Cc: Zhang Rui , linux-samsung-soc@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, b.zolnierkie@samsung.com Subject: [PATCH 07/18] thermal: exynos: remove threshold_code checking from exynos4210_tmu_initialize() Date: Thu, 26 Apr 2018 13:51:22 +0200 Message-id: <1524743493-28113-8-git-send-email-b.zolnierkie@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1524743493-28113-1-git-send-email-b.zolnierkie@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrFIsWRmVeSWpSXmKPExsWy7bCmnm7B3odRBu9uGlpsnLGe1WL+lWus Fpd3zWGz+Nx7hNFixvl9TBZPHvaxObB57Jx1l91j8Z6XTB59W1YxenzeJBfAEsVlk5Kak1mW WqRvl8CVcW/iLZaCR5wVi47sZ2xgnM7RxcjJISFgIvHsyEWWLkYuDiGBHYwSq8+9ZoZwvjNK 7Dq5nhGm6t2ZdawgtpDABkaJ7oXCEEW/GCU2P9vBBpJgE7CSmNi+CqxBREBL4sSl7UwgRcwC cxglZjXsZgFJCAtkSix4NBFsEouAqkT/1oVgzbwCHhJbjr1gg9gmJ3Hy2GSwGk4BT4kLR5rA 7pMQ+MsqMeHudnaIIheJ3j09zBC2sMSr41uA4hxAtrTEpaO2EPXNjBLfduyBqpnAKLFnvRCE bS1x+PhFsAXMAnwS7772sEL08kp0tEGVeEjsuDcJqtVR4tbdH9BgAXqm79dktgmMUgsYGVYx iqUWFOempxYbFhjpFSfmFpfmpesl5+duYgTHoJbZDsZF53wOMQpwMCrx8AYsfBAlxJpYVlyZ e4hRgoNZSYQ3vvVhlBBvSmJlVWpRfnxRaU5q8SFGaQ4WJXHepz5nooQE0hNLUrNTUwtSi2Cy TBycUg2MmbFZj+oMdhZL9Qb7m//Y8uXzjtcV2XGzPhyWrPv4+QD7n4Q9f5v8Agz7a34EXD/8 JUxN73nS7pAN51dnTFvuyla64un6jgNVCZzvFPnYJH53R7FMUk6TXlgmosQrtcxZ9Zj0rj83 d7gacvFMndsQuLh3p7Bm+qYMk4jJH8K0wzfpW/2K2ftTiaU4I9FQi7moOBEAqOfhSL0CAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpiluLIzCtJLcpLzFFi42I5/e+xoG7B3odRBu/+K1tsnLGe1WL+lWus Fpd3zWGz+Nx7hNFixvl9TBZPHvaxObB57Jx1l91j8Z6XTB59W1YxenzeJBfAEsVlk5Kak1mW WqRvl8CVcW/iLZaCR5wVi47sZ2xgnM7RxcjJISFgIvHuzDpWEFtIYB2jxKe9JV2MXED2L0aJ s1NXMoIk2ASsJCa2rwKzRQS0JE5c2s4EUsQsMIdR4vmKOUwgCWGBTIkFjyaCTWIRUJXo37qQ DcTmFfCQ2HLsBRvENjmJk8cmg9VwCnhKXDjSxAKx2UPift97tgmMPAsYGVYxSqYWFOem5xYb FRjmpZbrFSfmFpfmpesl5+duYgSGzLbDWn07GO8viT/EKMDBqMTDG7DwQZQQa2JZcWXuIUYJ DmYlEd741odRQrwpiZVVqUX58UWlOanFhxilOViUxHlv5x2LFBJITyxJzU5NLUgtgskycXBK NTA2z94RkH0/5QbvpM5XgYXrH53zudjmNv1sw8cTDzYUPXYsMotdnfzl0ZXrdlkzDP7rXVs4 m7196xzDmlxvlt/v9vFr+6yuUfI6W57TzJ9w+o2gh6VuKcPDpZLR/PoJNzfO1L681rByZYWA 0KJtNafi1KLm7k6o8Al3y1h964zPyp7kxbLrZjYosRRnJBpqMRcVJwIAK/daHBUCAAA= X-CMS-MailID: 20180426115216epcas1p3ed61f0fd8563e7ea72f3d7d17c9c039f X-Msg-Generator: CA CMS-TYPE: 101P X-CMS-RootMailID: 20180426115216epcas1p3ed61f0fd8563e7ea72f3d7d17c9c039f X-RootMTR: 20180426115216epcas1p3ed61f0fd8563e7ea72f3d7d17c9c039f References: <1524743493-28113-1-git-send-email-b.zolnierkie@samsung.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Exynos4210 one-point trimming is always used and data->temp_error1 is equal to 75. Therefore temp_to_code() will never return negative value for the reference temperature conversion. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz Reviewed-by: Daniel Lezcano --- drivers/thermal/samsung/exynos_tmu.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c index 58cd68e..26a0cb9 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c @@ -423,10 +423,6 @@ static int exynos4210_tmu_initialize(struct platform_device *pdev) /* Write temperature code for threshold */ reference = trips[0].temperature / MCELSIUS; threshold_code = temp_to_code(data, reference); - if (threshold_code < 0) { - ret = threshold_code; - goto out; - } writeb(threshold_code, data->base + EXYNOS4210_TMU_REG_THRESHOLD_TEMP); for (i = 0; i < of_thermal_get_ntrips(tz); i++) { @@ -436,7 +432,7 @@ static int exynos4210_tmu_initialize(struct platform_device *pdev) } data->tmu_clear_irqs(data); -out: + return ret; }