From patchwork Wed Aug 30 08:47:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 111288 Delivered-To: patch@linaro.org Received: by 10.140.95.112 with SMTP id h103csp595928qge; Wed, 30 Aug 2017 01:49:49 -0700 (PDT) X-Received: by 10.84.129.72 with SMTP id 66mr1070748plb.146.1504082989480; Wed, 30 Aug 2017 01:49:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1504082989; cv=none; d=google.com; s=arc-20160816; b=AXsh0431yYEq9Pv6MzTxTKaueoaz0z2+zMk9B6yKPmkQxsFNKRQ+zKr5Eo6F6EC5r7 jjB9yih4vFFhmsL6o6sb0l4K2xPYfe7GO7H6KWC6Ttn5yDKTavu5CAIjqdCyZT7Otn6Z CvPB/gGkO7NBUfUbBWuo7/UDdU2WkzkbyRjqxZ740Au9Nu29OA4W2D9lwiwIfEK4bcVh rKFKMnSciy/Sy+HUWSyDb9m81nrsc8N8ujk/m+/X4swKHjqfvIUoRL0vgTG53SE3WIJJ 3Hg0U1OjR2gq02+N5vr4r/SfZetdwcRPfumBb6VocHPPa0NM3aL/n0/zd6HbS/WUfGOQ PnaA== 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=WeFOG+oviVc1VL7UA3v8s8FiVMumNIWhEvJpbkLKeNQ=; b=Wi+U35fOY/sbEbqZSHFLxWrLKV66zk0RXHixlTnn+u7nv7KrBkDifQ62Sh/9v+jm1A npBNhemzR1AJ5gv0d0krQ+/1+e/3ltOKwfXdwpHdmiLLvvoGDu/leqzf33OLPW3aNE+U lf2AbQZg7579/RYLCvJ+jiDcPAz4ETXYVSKIBIoioOG3f995LGsMMuzsktTlAQ2ctUw+ oNQ9Z5ti2hBhhjE0DOVqWxfbHVcAltf01rNCqfp4aLuC4Gt/m4dSCdcySvc1D6FKZ62P +Ru8KTqDzJmGoVOKKTLDZQ1hRbBjvhEecd+TIaFLvrKanBJLXxRdeuK1h6tQ5/DBJK1N 2pWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Dv4dzHxM; 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 31si4075898ply.343.2017.08.30.01.49.49; Wed, 30 Aug 2017 01:49:49 -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=Dv4dzHxM; 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 S1751813AbdH3Itq (ORCPT + 26 others); Wed, 30 Aug 2017 04:49:46 -0400 Received: from mail-wm0-f46.google.com ([74.125.82.46]:38180 "EHLO mail-wm0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751523AbdH3ItB (ORCPT ); Wed, 30 Aug 2017 04:49:01 -0400 Received: by mail-wm0-f46.google.com with SMTP id t201so6050985wmt.1 for ; Wed, 30 Aug 2017 01:49:01 -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=WeFOG+oviVc1VL7UA3v8s8FiVMumNIWhEvJpbkLKeNQ=; b=Dv4dzHxMjB3YYBUWo55pc3ASatUiyuAdV3XrxPB/9FHUPFpbWYvnePQh/Icgfep9hU qsLWae11Yq1BlQ79+CBWa4UFSlh4ITShMj+H1kFTw94nYlJpVVjUQGHX4I9dwj9ssL0N Er2O1zJUzvMbPA2rgGyrUcm7TpFYLbYOtcK3U= 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=WeFOG+oviVc1VL7UA3v8s8FiVMumNIWhEvJpbkLKeNQ=; b=Ir+plEiAZnJ0JncDHWsEZ63kL11bMhFmXtxOkYm9l0d5MxdkhWmGBF2D52PZCiLAbd QDQiRu3el8sGkFW3vDeOMCXU/E3z7AOpigoFopU+2/rsx6uP7VB74+AhpHqbuyOc+OsJ IJDlnfInVQWdb4EuMM2olQ+Fz+zDhYN41i3Jp6nso8XRNsDfhlYdgVt5Sgz0CtHC6tLY q1uSnttumoRjbIExxOxLFqFHJ2r2JiHsdtQaN0ER1Ze/pJyyM3De2rufPL28hMRy3pZu EFrjnHj27LLvjHoUetSejw9IoEK4YZKAFkAXOq50keI9ZsekTpFz+u208MXntgCgxafJ bUrw== X-Gm-Message-State: AHYfb5jr4oFCYhYYklp22FrmdkJHdOYIph5vOFFliXv3NpRSUwFXaakG /7B30YqIMsj0ROLZ X-Received: by 10.28.107.193 with SMTP id a62mr809597wmi.101.1504082940367; Wed, 30 Aug 2017 01:49:00 -0700 (PDT) Received: from localhost.localdomain ([2a01:e35:879a:6cd0:b0b0:ba2b:b9fd:8a33]) by smtp.gmail.com with ESMTPSA id q24sm4032811wrc.26.2017.08.30.01.48.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 30 Aug 2017 01:48:59 -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 (open list) Subject: [PATCH 11/13] thermal/drivers/hisi: Convert long to int Date: Wed, 30 Aug 2017 10:47:35 +0200 Message-Id: <1504082857-21702-11-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1504082857-21702-1-git-send-email-daniel.lezcano@linaro.org> References: <1504082857-21702-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 --- 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 68b625c..9eee82b 100644 --- a/drivers/thermal/hisi_thermal.c +++ b/drivers/thermal/hisi_thermal.c @@ -83,12 +83,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));