From patchwork Tue Oct 10 18:02:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 9996955 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 748F660216 for ; Tue, 10 Oct 2017 18:11:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6BC4028701 for ; Tue, 10 Oct 2017 18:11:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6098828708; Tue, 10 Oct 2017 18:11:58 +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=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham 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 B267B28706 for ; Tue, 10 Oct 2017 18:11:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932316AbdJJSLy (ORCPT ); Tue, 10 Oct 2017 14:11:54 -0400 Received: from mail-wm0-f50.google.com ([74.125.82.50]:52099 "EHLO mail-wm0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932572AbdJJSFG (ORCPT ); Tue, 10 Oct 2017 14:05:06 -0400 Received: by mail-wm0-f50.google.com with SMTP id f4so7717381wme.0 for ; Tue, 10 Oct 2017 11:05:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=8tlFkhzvnYbROhWQTnLeyuuETSlHmvgdSfYQC4eh5q0=; b=Zf6Ywt+jn2LJECScQ3IgtoVT+LotCYdfmL87SgyzyNdPLRM13zFtbo1nAn+so+TUl7 QlfMo5PDZh9ruKT3s5qEEtV+99eGUmVq6IC4ZwOg2f7yy/pJ6CNt3U+ZyvHojYClkNvW wT6HrbCWfhGdNJ9rE04bGa5n95u/jT7RZ2K5s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=8tlFkhzvnYbROhWQTnLeyuuETSlHmvgdSfYQC4eh5q0=; b=bL30QjU8kUablGaLhCZkEP9w6RcoCwlbF90DG9+6C2QQ0D0BaFWOyt9XJdjWKVhdsc gU0mXwCGVFj0xdrEZIk1utQNDHtCUlnZpcnzf/GKxli+DHbOOGmK6BLYtaSKCj4w0WhZ DqNdC4La8tyG7Rr4eae2barS/vzb0TJ0Cd2zWo2+R1FqkzT52q99rn5ZJCXYJYQsSt7I lrAR/0g7AWvmJN8MGhTbvhZsNWiNpok3k3KYdQDR8isP2LRz5uSKgmS8K2MVLhVeQanq 6icLTCZinl4cnvplA+DsFGP39jDh1Nj/3kXsZxXYouga1IY8Bn5WPWIrT5MAquKp5r+d Jwcw== X-Gm-Message-State: AMCzsaXAX4u3wvkerc4AAcOqs2qBPzADwO0awYWhtdp2LH5RyVEUbd81 YVf+1qXqY7Q+hvQ7An6AJ5PBZw== X-Google-Smtp-Source: AOwi7QC5mOH6tgBfVzZSpNpjlbue41F/1ICU3vCDvJnTlgYgjWWYtRP3fuG0LEMXWKZv5Va8A9s4Gw== X-Received: by 10.28.36.212 with SMTP id k203mr10564874wmk.127.1507658704762; Tue, 10 Oct 2017 11:05:04 -0700 (PDT) Received: from localhost.localdomain ([2a01:e35:879a:6cd0:4f9:3ae1:43d2:31ae]) by smtp.gmail.com with ESMTPSA id l73sm12513428wmd.47.2017.10.10.11.05.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 10 Oct 2017 11:05:04 -0700 (PDT) From: Daniel Lezcano To: edubezval@gmail.com, rui.zhang@intel.com Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, kevin.wangtao@linaro.org Subject: [PATCH 11/25] thermal/drivers/hisi: Convert long to int Date: Tue, 10 Oct 2017 20:02:36 +0200 Message-Id: <1507658570-32675-11-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1507658570-32675-1-git-send-email-daniel.lezcano@linaro.org> References: <79a5f10c-0fb7-3e4f-caac-c1625904b137@linaro.org> <1507658570-32675-1-git-send-email-daniel.lezcano@linaro.org> 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 There is no point to specify the temperature as long variable, the int is enough. Replace all long variables to int, so making the code consistent. Signed-off-by: Daniel Lezcano Reviewed-by: Leo Yan --- drivers/thermal/hisi_thermal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/thermal/hisi_thermal.c b/drivers/thermal/hisi_thermal.c index 70dc373..dabe9a8 100644 --- a/drivers/thermal/hisi_thermal.c +++ b/drivers/thermal/hisi_thermal.c @@ -85,12 +85,12 @@ static inline int hisi_thermal_step_to_temp(int step) return HISI_TEMP_BASE + (step * HISI_TEMP_STEP); } -static inline long hisi_thermal_temp_to_step(long temp) +static inline int hisi_thermal_temp_to_step(int temp) { return (temp - HISI_TEMP_BASE) / HISI_TEMP_STEP; } -static inline long hisi_thermal_round_temp(int temp) +static inline int hisi_thermal_round_temp(int temp) { return hisi_thermal_step_to_temp( hisi_thermal_temp_to_step(temp));