From patchwork Mon Sep 4 19:56:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 111609 Delivered-To: patch@linaro.org Received: by 10.140.94.166 with SMTP id g35csp1935514qge; Mon, 4 Sep 2017 12:58:11 -0700 (PDT) X-Received: by 10.84.128.1 with SMTP id 1mr1765147pla.238.1504555090948; Mon, 04 Sep 2017 12:58:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1504555090; cv=none; d=google.com; s=arc-20160816; b=npC4zaQX5+aGojlJJb0Qh/g3xJDX0nGdS6gzi71o1WEfSx9vT6XjkyLFh3FZ6V024w IBP4trz3bi5aDYVgSrTg7jdLLeLi9Jr4uQlidIjRH0z0nQ/+OHPhWVNH51b4E5UyGlZC Gqps5L71RmLnYSNHilK9UwOZupRFItuOKBy4T/Amyq82MmceM+5ms3kkplWKqK+u4+xH gavSlOz8vzHDBu+zZdmmUJdJYnAhhNO1O5mFrZDNEt2vIKaFi2R+S8iqGxMjHmgYdVyk yfFxcTnCXQJyw/TMuJtzx7SOEYKaWpS/oldcNa+wzPBD5i+ZVOX65pzP4QCZCB/E84kT WFiA== 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=2ftMwuvuGfpeb9j4YNx/1YhTlSOPykQzQRId7g4qtUg=; b=XTjopgSfiz9srABJr48Diec6QINkZqVoXJHXJZsKMIKxqmhbBa2S2hU5Ps1Ly75aX9 whIwWgQ4VHIDGcokZQ+NoC1ldbV6oXbN2hYshADTtvMoNslNAqxLJnCHzApO5Txt+yls VeP0MnGC66JMm3embVuKGhLmEfyVmn4YVYdyRNZa/S2iT46ME1TQYZ9OmrR2t0q4CvzY Mgz5DO/Wizcgwcc2rgUEeGy/wpFh6QwQprpo/wu5KLjohcjHxU+B7e2ifuN4hsWGFd8t XPFrbV5KIyF6JT/OU3SWANzcLNStGAWOu/HzUZJtGDnqN6lMCoYOBaighPbmQ0lnGd6p SDWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EharbUu6; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x3si5784702plb.754.2017.09.04.12.58.10; Mon, 04 Sep 2017 12:58:10 -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=@linaro.org header.s=google header.b=EharbUu6; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754125AbdIDT6H (ORCPT + 26 others); Mon, 4 Sep 2017 15:58:07 -0400 Received: from mail-wm0-f50.google.com ([74.125.82.50]:36590 "EHLO mail-wm0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753988AbdIDT5v (ORCPT ); Mon, 4 Sep 2017 15:57:51 -0400 Received: by mail-wm0-f50.google.com with SMTP id i145so9881182wmf.1 for ; Mon, 04 Sep 2017 12:57:50 -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=2ftMwuvuGfpeb9j4YNx/1YhTlSOPykQzQRId7g4qtUg=; b=EharbUu6T8k1/jfxUc5bdMuqXD+1SlCRRFU2n3oy/YE8ZPjr8wVaWTkPasaOvfMdYf igkmWxPMYRILWN7pu1TpMCJ84tFJDcMNaigmc8RjVe8wz0noQ4cpbiFO45SSwzau6h19 csSMQ5OuCs7n0Bi9F9WPfwp1TIpIn9Puk1J9w= 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=2ftMwuvuGfpeb9j4YNx/1YhTlSOPykQzQRId7g4qtUg=; b=n7AWGnOpgi1L6YAKVksKNY/xvcuKexkXxs3x6bUEI/y1V0Fa+C6cNDzhyfgydvdI7z VeFmasBYeqNzhdEvvrj/mxwQX061dB3lhi8ZmEI9mOheXkO0YtPQzx/Sa+B+h8qXwRBx 2JJ9iqyWNjjeXcs3KGLlGT0r1k8VvT4YJ09DS7n31v0ZRpMw9haGbW9a1FgYMXMDUNE4 wCZIqfwWs3QPczrB3aw6PkD89n5GMyNM3h+Z6a3BXxQ7zvHCPSQfrnvYvxJLeYo8rsm9 Z7R4XcOkctImSWYVoe34TLF/Ox8ab6tNCaFTMZlQBQBn3Jk101mlQlQXT/uMGVglNQsB yswg== X-Gm-Message-State: AHPjjUjzcpSeyQyY+eLrajhJ3Ji9EXShrjUGO+lMOjPqEf1lrR0NMs2T IwfYuJivUpm+U9COU1QNDA== X-Google-Smtp-Source: ADKCNb6F0WBbZ/Qj1zpfs1N8j4HQ44ZbJiyFINvvaGQNAuYSQkXvbkH8BMw7btbPwKot0cmwrzRb2Q== X-Received: by 10.28.111.73 with SMTP id k70mr792046wmc.84.1504555070027; Mon, 04 Sep 2017 12:57:50 -0700 (PDT) Received: from localhost.localdomain ([2a01:e35:879a:6cd0:f567:7c41:be9d:9286]) by smtp.gmail.com with ESMTPSA id 23sm10798976wrt.44.2017.09.04.12.57.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 04 Sep 2017 12:57:49 -0700 (PDT) From: Daniel Lezcano To: rui.zhang@intel.com, edubezval@gmail.com Cc: daniel.lezcano@linaro.org, linux-pm@vger.kernel.org, kevin.wangtao@linaro.org, leo.yan@linaro.org, linux-kernel@vger.kernel.org Subject: [PATCH V2 11/13] thermal/drivers/hisi: Convert long to int Date: Mon, 4 Sep 2017 21:56:10 +0200 Message-Id: <1504554972-2624-11-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1504554972-2624-1-git-send-email-daniel.lezcano@linaro.org> References: <1504554972-2624-1-git-send-email-daniel.lezcano@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 4c47b4d..0c06d14 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));