From patchwork Thu Oct 19 17:05:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 116426 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp724190qgn; Thu, 19 Oct 2017 10:11:10 -0700 (PDT) X-Received: by 10.84.240.140 with SMTP id z12mr2049756plk.328.1508433070092; Thu, 19 Oct 2017 10:11:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508433070; cv=none; d=google.com; s=arc-20160816; b=pJrSPCW2RnICcN5//8q3z9bovlfEDMxYARIVE4Kc27YHdCBGaSL6V1fxa4rDYhAgmy EimIZv57/JjZE4DWMSS3+lw2J1Oq/3TLfKdWDKA0pukeuHtRMnqV1sexBCFPtnrJ7M8U 7UhqfhS+2oc4ikx9vlhQ9t0HB95xivfemSQ4rZrAAWz77BdvIbMJfLYKbsxFQpH96NjM LX4HoiaP7B4BxdDUZ2WO4AlECa4MHr1PETg6WCoscQVHcg5fuGOtpalyRl5KPGLlppLM +mHrxF4I42U2jvYKYsMS6lRI1cGGi2YTjGePgoy3G3obfkJYtytbD0Gc3OjkXB6G0Ysl MA2Q== 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=AGT7sYZX77Q44Vpe57+dMHFMiTlzmOmmxVDwzbt3maM=; b=FVy96NdpwFrX3mwehOVEDtw2jFJJeCZv6340JSqS4uhbUzxgA5VQI3taSrO28ESh3h BZjBxhPEMV6HQl0F5g/L80rDMxqhIPAa30ZCJas4ISu62Y9GRJCkPXC6Lhh2EgPhq5lD eB+1XXtU+NRE7ZOWNtOVBcfjduRladrSVXCvqAtC52FdrDvV7W51AkAvtSitZc+eaQIh SevBlpFDCBV3jYqBXnwrhK8GRstZnrtc76UgOpi1q6DzhofKtFIpD085kg3AX4p2FLiz bfKT0oHdutGcnNX7Wr1BnrP722DlAorgR977NtMLGX3UGI7+9LdyLH0ZZDT3FlXQVcOK szow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Mm6guW5D; 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 q12si9696670pfl.470.2017.10.19.10.11.09; Thu, 19 Oct 2017 10:11: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=Mm6guW5D; 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 S1754540AbdJSRLI (ORCPT + 27 others); Thu, 19 Oct 2017 13:11:08 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:46378 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755077AbdJSRIq (ORCPT ); Thu, 19 Oct 2017 13:08:46 -0400 Received: by mail-wm0-f65.google.com with SMTP id m72so17367331wmc.1 for ; Thu, 19 Oct 2017 10:08:45 -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=AGT7sYZX77Q44Vpe57+dMHFMiTlzmOmmxVDwzbt3maM=; b=Mm6guW5DxW1dbyGQdipfV/tB2gXaJLZzUIBmUuyRlf7F25x4EtbNeyRisl0CMCiTr9 +cUjse4jzl9P0HI0+Fym6mE8klBBbBp/sOBAQXICI0FtLYT/7YTol/vsy6ei+F9vwaLu jgxJJlpahC451wbn8hIKl9LDTI9vXR1ELjIBE= 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=AGT7sYZX77Q44Vpe57+dMHFMiTlzmOmmxVDwzbt3maM=; b=gpUrKdoO3o/WxvpU6lyZfg6p1wGNFZyf2wIpNr/OEesp7xW+stoaXnGc/ne8Wc4UG3 IrxcypmnAntQTmatvBhMOFASoBWNsn1Oufiz3FhXfQrIJp4i7tsTUpuMeXjwlB/qez7c l3GTMl9gOlJAWc4AYa/Kgc+p0wNNWE04g8sxfIB+qdcq540/kWXC/BFRvDNRvGE5GgJU 3iiLCIUDyehY8PbvUXnDnQa49sI2cXdf5v3M4SyQMyRs0xOgAzs1Gh88VoQez95j3iIw If3L/dB2K/U2LFh5QqNHh0AANG+TM+kwqz++0h4Xpzb3kNtHN4e1wraSR1wdejy2I2P3 l+kQ== X-Gm-Message-State: AMCzsaX0lDBm3tQ/6goRYwXQ1FdvgEF3fZegIpu1LV4ZeD4SKgDlfH7p q2ImFXQbWKRB76PIKlKhrwkt4A== X-Google-Smtp-Source: ABhQp+Rm1z/Y+/WlyHrDVw5wvc0dOl1wNqEDbWtitOFciQJbQkRm+Xxg7GTdOqfLBYtDieXR4ZnC1g== X-Received: by 10.28.134.66 with SMTP id i63mr2193452wmd.107.1508432925166; Thu, 19 Oct 2017 10:08:45 -0700 (PDT) Received: from localhost.localdomain ([2a01:e35:879a:6cd0:51c7:d9b7:e14b:6840]) by smtp.gmail.com with ESMTPSA id g16sm14277394wrd.72.2017.10.19.10.08.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 19 Oct 2017 10:08:44 -0700 (PDT) From: Daniel Lezcano To: edubezval@gmail.com, rui.zhang@intel.com Cc: linux-pm@vger.kernel.org, leo.yan@linaro.org, linux-kernel@vger.kernel.org Subject: [PATCH 11/18] thermal/drivers/hisi: Convert long to int Date: Thu, 19 Oct 2017 19:05:53 +0200 Message-Id: <1508432760-17847-11-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1508432760-17847-1-git-send-email-daniel.lezcano@linaro.org> References: <6ac48f08-7fe6-92e9-0801-6ed3bcd05ff1@linaro.org> <1508432760-17847-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 baa3853..5382073 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));