Received: by 10.192.165.148 with SMTP id m20csp1978623imm; Thu, 26 Apr 2018 04:58:46 -0700 (PDT) X-Google-Smtp-Source: AB8JxZo4TgILPFxeOrsrPht9soBZOj03MEx5SFSDLzHXh9ZMPPRmk63T3Psikmrf9mf0s2aMi+Gl X-Received: by 10.98.11.210 with SMTP id 79mr636667pfl.4.1524743925973; Thu, 26 Apr 2018 04:58:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524743925; cv=none; d=google.com; s=arc-20160816; b=PIr4jRel3EfXNHTbUeA5ZH/5IrP1XUqMTl+r3O18NZMYBvzeKI9aGr7I4412eeWZbn WY9fBsJl5nzyVRYRxxuDHquwXx6Y6CHhPfFBPsOYuzDJpIsKOAbrOylsr8sbS01zu2kO T+bAwH1or4mqE7+RbZM82idnHkie9OmaPNDHowSXG+Eu0l2oCZXbg6aSKs63FRLPQpbi GgkZ2aYrkspjZqlMW2Q4hvftOtQ7h5AK2+GGbxOiB1QhzNEtJ9T/xu5cJJ5MRpLE+M1b OEtwEZ/CvA+37Puhhljec4+fX3H3lpVM7Jk0RZ17ujHHyyRPjywI3I3y0mvFCsmLhHTj trAg== 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:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=PMf2lVdSz0/aJ/cVB9qBFPzS8UzguQUE9y4qVeUwH18=; b=cGsBgPhv9dfVUG6lGUPfG8IwdilUZZf85fHy/2I9pFJ6A3bGGyFvyqLs6t/zxIASNV 88PvQNjdGClPlsH500SzDjeFnQfguBtMozMDnH7fWvBwMFpSt1VCuQRUtD8CatUIygGD 4WYOMWq9GmkbAQKYltOZbA5vJg6qFr2M/czqiMNDF2LfHBpvEuhqjG7bDbbKgdzfpezf xp9EHtXi7aW5Syng79B7JrKHqFhjpxXx2ki4P+PFZo5jQdtVzcrYg2lGO7z5DVuL6ECO DM+jtWu0hkMQYdTAN2z8dCSkN74wt2xBtN4JZ0igtcjlK2x6gQ7vGYgHxJglmnb88vmg /Ohw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=kVp+azLQ; 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 o3-v6si5548261pls.498.2018.04.26.04.58.32; Thu, 26 Apr 2018 04:58:45 -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=kVp+azLQ; 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 S1756161AbeDZL4b (ORCPT + 99 others); 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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; } -- 1.9.1