From patchwork Thu Jul 26 10:33:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 142956 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp288564ljj; Thu, 26 Jul 2018 03:33:37 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcHYC0YlkVXwzgX13DFnzo3G8sSHH6tQ1Q4xJoeOL2G65OctiSXbyWnC/BpGECtbzKDBnvz X-Received: by 2002:a63:5542:: with SMTP id f2-v6mr1416626pgm.37.1532601216938; Thu, 26 Jul 2018 03:33:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532601216; cv=none; d=google.com; s=arc-20160816; b=mKIFN2NS73Bqnc3UEn2FglJcqAEobAYfU7hXAylKlUsyUEKZnKsiBoq4WMgDU0+as9 lOZhbL38uEb7wR3uLc0ks+6MjoC2a6xsEKLX8mZqyyfrZiZyhX9j+7Xq+vw43CC4bJU5 gqJepDqYTeeIVdrAO9yBmJ0MxVaAXLdG6egQuAHg0a5NBeDNzrIewD3GFzSs2Nex+X3h 5NEo4mD+k7wlTqOXObtNrVgSATzEgcIjRwljObPwLJCVLPFdT8agDSQgeUMP7zmSHVrJ RvFAO7I01yblfoepcifWrC4yI2+JIQ6FDlRAg/+P9FgSlg52CfMnKPVbzo01Y709kXoB wOEg== 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:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=LlTjF7iTHMsf57iFeH6E85/+9b8NIV2YUPikYA5LJe8=; b=aC1+PBsB/KwtfwI1EekndTn5S0QpvJHjlLLGqZG9oeHbyTCcDkMeipOBBv8cDXEtEe ioCRz9bhX7vudFZIDJDWV8vHgBgviXT7Yivu2axiwMDYtGTTbSJ6ACotRxUI+kkl7PRx iKo5+WHO9uC/SPyYE0qsVTmJKUxFxDJlPV16moHT9jfg/+skAcFBWdUhCQU0qUlyFdQw qOaQyBVhagoGAL141FJeaJ0xZUic6BMpoazIRGZrYOAY8oceqiyPp+hxd351R7WqnNzX qLuqT4HT11zwUpgKRzgBsMWxIlBhwp2X8MgIWz0+ci/x/R802r8zUVZfl89exo162/SA qwUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GR4XghGi; 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 i130-v6si959598pgd.691.2018.07.26.03.33.36; Thu, 26 Jul 2018 03:33:36 -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=GR4XghGi; 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 S1729308AbeGZLts (ORCPT + 10 others); Thu, 26 Jul 2018 07:49:48 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:36491 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729155AbeGZLts (ORCPT ); Thu, 26 Jul 2018 07:49:48 -0400 Received: by mail-wr1-f66.google.com with SMTP id h9-v6so1200800wro.3 for ; Thu, 26 Jul 2018 03:33:35 -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 :in-reply-to:references; bh=LlTjF7iTHMsf57iFeH6E85/+9b8NIV2YUPikYA5LJe8=; b=GR4XghGin49xYSALOShEfosJa0gs/9O2sxviVln6NkAacwYKHQ+bk5pAuxLdXxHz4s qCaei9mwgM/oAsD8CK23kAy5DvOa26Q9QGSIaTf0EcJMJv+pgc2QbGnCmkWPgDTCu10Q 09UYU7+Wn5GLF4aokTqvXzaKZIT+iBaGixhYA= 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:in-reply-to:references; bh=LlTjF7iTHMsf57iFeH6E85/+9b8NIV2YUPikYA5LJe8=; b=WvKsq6h/I1ZFUp+shot2VH/1kL9IBJ2Z3R7lGHdxCKFPWZaGNnwL/9HyS+6hZ8o8j1 O+121JDGZJfT1UqSqqJGYWkjljo7Iy2e/wSOjZgMalY8u/YYZIKBwWQnfJodODKaEJ3v vcC/OiCYKOVsAc2ONkHYApxtu5NwosKmf5ozfIpOpPFj/EjtM11AnXOTYbFsGzmTzuiC FuwKSS/Gb9H5h0eZp5T+aRePjg8UZ9+bC+B0n4dVebktzIKLEly12bixZst+SIawwjgG Y7MyAtkRKwbGzp/9pVDaKWQuJnhawGQVhq+69qE7+nK1b53PTJGNYvrbyH482iIsLiWC fPpg== X-Gm-Message-State: AOUpUlF1eGCmNY4yZD6KO2xHblLTraZi0FpsiEKNzIbLyyZvea2iVt/m jNGebvXkwR7ZIGBpWI26zqXBpg== X-Received: by 2002:adf:a197:: with SMTP id u23-v6mr1210365wru.50.1532601214477; Thu, 26 Jul 2018 03:33:34 -0700 (PDT) Received: from localhost ([49.248.197.57]) by smtp.gmail.com with ESMTPSA id x62-v6sm1458087wmg.1.2018.07.26.03.33.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Jul 2018 03:33:33 -0700 (PDT) From: Amit Kucheria To: linux-kernel@vger.kernel.org Cc: rnayak@codeaurora.org, linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, edubezval@gmail.com, smohanad@codeaurora.org, andy.gross@linaro.org, dianders@chromium.org, mka@chromium.org, Zhang Rui , linux-pm@vger.kernel.org Subject: [PATCH v2 1/3] thermal: tsens: Rename variable Date: Thu, 26 Jul 2018 16:03:08 +0530 Message-Id: <5160b58d1d14b87b84ea49adc804afbefb792c34.1532600791.git.amit.kucheria@linaro.org> X-Mailer: git-send-email 2.17.GIT In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org We're actually reading the temperature from the status register. Fix the variable name to reflect that. Signed-off-by: Amit Kucheria Reviewed-by: Matthias Kaehlcke --- drivers/thermal/qcom/tsens-common.c | 6 +++--- drivers/thermal/qcom/tsens-v2.c | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) -- 2.17.GIT diff --git a/drivers/thermal/qcom/tsens-common.c b/drivers/thermal/qcom/tsens-common.c index c22dc18c7c65..25e7f247b027 100644 --- a/drivers/thermal/qcom/tsens-common.c +++ b/drivers/thermal/qcom/tsens-common.c @@ -104,11 +104,11 @@ int get_temp_common(struct tsens_device *tmdev, int id, int *temp) { struct tsens_sensor *s = &tmdev->sensor[id]; u32 code; - unsigned int sensor_addr; + unsigned int status_reg; int last_temp = 0, ret; - sensor_addr = S0_ST_ADDR + s->hw_id * SN_ADDR_OFFSET; - ret = regmap_read(tmdev->map, sensor_addr, &code); + status_reg = S0_ST_ADDR + s->hw_id * SN_ADDR_OFFSET; + ret = regmap_read(tmdev->map, status_reg, &code); if (ret) return ret; last_temp = code & SN_ST_TEMP_MASK; diff --git a/drivers/thermal/qcom/tsens-v2.c b/drivers/thermal/qcom/tsens-v2.c index f40150fd7eae..908e3dcb2d5c 100644 --- a/drivers/thermal/qcom/tsens-v2.c +++ b/drivers/thermal/qcom/tsens-v2.c @@ -16,11 +16,11 @@ static int get_temp_tsens_v2(struct tsens_device *tmdev, int id, int *temp) { struct tsens_sensor *s = &tmdev->sensor[id]; u32 code; - unsigned int sensor_addr; + unsigned int status_reg; int last_temp = 0, last_temp2 = 0, last_temp3 = 0, ret; - sensor_addr = tmdev->tm_offset + STATUS_OFFSET + s->hw_id * 4; - ret = regmap_read(tmdev->map, sensor_addr, &code); + status_reg = tmdev->tm_offset + STATUS_OFFSET + s->hw_id * 4; + ret = regmap_read(tmdev->map, status_reg, &code); if (ret) return ret; last_temp = code & LAST_TEMP_MASK; @@ -28,7 +28,7 @@ static int get_temp_tsens_v2(struct tsens_device *tmdev, int id, int *temp) goto done; /* Try a second time */ - ret = regmap_read(tmdev->map, sensor_addr, &code); + ret = regmap_read(tmdev->map, status_reg, &code); if (ret) return ret; if (code & STATUS_VALID_BIT) { @@ -39,7 +39,7 @@ static int get_temp_tsens_v2(struct tsens_device *tmdev, int id, int *temp) } /* Try a third/last time */ - ret = regmap_read(tmdev->map, sensor_addr, &code); + ret = regmap_read(tmdev->map, status_reg, &code); if (ret) return ret; if (code & STATUS_VALID_BIT) {