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: 115440 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp4045926qgn; Tue, 10 Oct 2017 11:11:56 -0700 (PDT) X-Received: by 10.159.218.9 with SMTP id v9mr2930289plp.92.1507659116894; Tue, 10 Oct 2017 11:11:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507659116; cv=none; d=google.com; s=arc-20160816; b=tYbRi9iSk87MXOCnjmncKRLMJIQgYQ6e1lGXO3JIp7QYzY/+650AK3jKL/CwqG4umP AMdIUtfG0nzXsb86hZTeElFG8dvKNXl82F3ikzAFAaftuP7iA33Fe85qPy70hUdWpRxO pdAeNSbQIaGahiyejMmQZiL2vjcmfVapbjLBVFNt5ub/6FQ2OLIGK9Z7KzOfZAz6EOmr SK3NBj10J/uNEGpLL4X/Jc6XAwr1ay9xR87Cf4jNK4Ign2nIZ2i7SiNIWh00TDsAseX+ QftCmi6wCG/w+eFEZmyzDVdAkYd1MTDXpph0HTGSZU5gFR8bL6SY8vFijpx92RdDiuwq 9nRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=8tlFkhzvnYbROhWQTnLeyuuETSlHmvgdSfYQC4eh5q0=; b=eZt93C1KuksVfuAL18z+2nNlSxqXFyzd7gnRfNgAsQ6ZlUXPyq1s+HrSdMEOlhrKhH I2lq87V3Gl+1qJbKI+dwnxCcqr+iqJpOEwHcmovovAsQ/ZKen+yNoshISFdU7d97OTiP qQCO65hYWGodVEq/VhGuAkLA94i7KKpr+HqWGjjaPWiZkzjp9qXvy2FQIhlSeQnrZjJc /N/p6isAxVuL9S1MIzJwiVbrV+9QWVIX1CJ91YVwfZmhA7bJAL0Xdf+pvC7/d0jYI6nA wfCMT+iLe/Lng4an/88CfLFOr8N81U3mb8oaTQ+TSMWeHh1OPU7bc+vG/VTSpn0Fm0Z/ pX+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Zf6Ywt+j; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l3si2358810pgs.468.2017.10.10.11.11.56; Tue, 10 Oct 2017 11:11:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-pm-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=@linaro.org header.s=google header.b=Zf6Ywt+j; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932316AbdJJSLy (ORCPT + 12 others); 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 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(-) -- 2.7.4 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));