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: 10017861 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 BB693602C8 for ; Thu, 19 Oct 2017 17:11:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A4E1128CF0 for ; Thu, 19 Oct 2017 17:11:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 980E428D55; Thu, 19 Oct 2017 17:11:23 +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=unavailable 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 271BC28CF0 for ; Thu, 19 Oct 2017 17:11:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754168AbdJSRLH (ORCPT ); Thu, 19 Oct 2017 13:11:07 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:54571 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755073AbdJSRIq (ORCPT ); Thu, 19 Oct 2017 13:08:46 -0400 Received: by mail-wm0-f65.google.com with SMTP id i124so17715713wmf.3 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=lqq5S9Ze8/fZOIeL1PKdYXa9DRqJGYSGXWj3+9U0St52Muc4ii87AxvkvREtfp0q95 d90ejfM3qM15Vd/ofcM8Cner0l263fh5LpvzTdtk0lKmik1q3yKO/k5d1xMrXZrMYXNI iL81UNNwRUszRmYsq4AHDjvUPDMKtexGpSW1YX0XN4DztO9ft3+C8Hh/C4oGqc0WENxV FVgpdEwSa4uJ6WJjN7ZUJ1KX/9UbxrO4YKbFL2dn2mtIHdmb2f8Y+n3Cjvsk8JV3nzWM /bmYRT8pAfjn6FdVi/kf/3fdwtByKtMd8zm3Ffz/OUApGEUjdSnlvfxkSCXAkPGk/Shi Glrg== X-Gm-Message-State: AMCzsaVLnC0Y6pAFz27J/GAhNlQFtxeNESiiS7+KYznDFK/2JS8y1xAs 5KpBKMZmBVfLc4p8mmci7PsgTw== 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-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 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));