Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp212249imm; Wed, 18 Jul 2018 00:26:32 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcfG5cIIQHeViSkpSNuP41wJj8n0CceB+nrRjcMUS49OtvBYCIqC6Y/jUqSYYKF9f9OImlI X-Received: by 2002:a63:951e:: with SMTP id p30-v6mr4697755pgd.318.1531898792639; Wed, 18 Jul 2018 00:26:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531898792; cv=none; d=google.com; s=arc-20160816; b=uamQzLV+Rp4S+CMZ4v9/J0hUze6sYs92udScnF0gd3V4R0v8zhZMms6Bsl+U++Qz6Q xXv+bvbxtuYWC11vCPSfi/dP+eW615UbTttsDd0YZFS4yWLIG9o/WfyoPyubOLgerfN3 eDJvDaD2BaTd32hI48983SCKdEYadfnR09Ad/rmEQ3oGBTd6iXLC+PHSkeiBHEd0oP66 4pfB4lb3NG0MTtYVZLSTKpajYvmJABp9XGaPZAmRVCRL6j7kdqL3OjKXNWLaQOImfW3R zsSgpKYpZwk+KP/1SnOBT8CdKwUzr2LWDEMzhbgHz+lox18gNqM4khHqblH173b9xiCL pVQg== 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=+EqCCIrnC5FlIeZsiZWAuXMV4exxQ1cT9lKye3jrTmM=; b=q/5uFG45qqkiwNY3AcENLAXzuF2b1PNac4U0Fl7Yf+jnbkGotFgN/v83cFjOCQ+pdD ObXRbFG4I3+MPn77+awy5u00au6YsOj5UOr300lEkYSZgbUb92L+UDIo6459KAzXCcAI 0kkcB9GwDcd6tl9eZ2n/OaNCVrMZaN3AxBDPludFdALiIsWGofZR5nws70pdwRQ+Zh7c MrwW+S8RxwcbYy8eJ8P+ZUw/pjA+XALCeSccQ/htd2UW1QNau/NPw9mxkxSwyRdvCvf3 PyCx4q5so1IADQHRlctO1tf7gDiIJOKEoujhchzqkuKiKm/L7qsGR01oVz2bXM0sTlSl Mk7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OwrsM1z7; 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 x69-v6si2823173pgd.635.2018.07.18.00.26.17; Wed, 18 Jul 2018 00:26:32 -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=OwrsM1z7; 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 S1729209AbeGRIB4 (ORCPT + 99 others); Wed, 18 Jul 2018 04:01:56 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:54328 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729058AbeGRIBz (ORCPT ); Wed, 18 Jul 2018 04:01:55 -0400 Received: by mail-wm0-f66.google.com with SMTP id c14-v6so1682773wmb.4 for ; Wed, 18 Jul 2018 00:25:28 -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=+EqCCIrnC5FlIeZsiZWAuXMV4exxQ1cT9lKye3jrTmM=; b=OwrsM1z7RuprWuvIagsuan+fjMXs3MSwOqcjZ/3aQEIKiMnBY4W66n/7S7gVTmTycs s1pI7XIsV2VP2oh2yIs0Q4gAz9rHUE05RfZIXzDC1s5To86NxKMgRI7uFk8oyvDIoldL 2ZakYAyV/h3/yeFesb2REovox043w+HYWkZvI= 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=+EqCCIrnC5FlIeZsiZWAuXMV4exxQ1cT9lKye3jrTmM=; b=QbdmnqerUkcJ73jFWakWUgCFs3rIJpG9ocRBQa1DHhW5I5pKLUdpFE/6RxcQhAeVbr glPia8mC6wbP3MehI995U+EEQyeostq86D6Zm48dkyBZB/kWkBF1vuCNDF+E2pgvUFkV pkJ5WsCU6AdqN1KyjnZwTlNYT6D48wR9G949NkHQEVECPuxKOVpjuZaNpv5RdKl9jnY8 LkuQLF7rSE0whr/Kv6Q1gtdf9GyinXtDODWuOg1Gm4OiOXc8kba3Fl5wNJYQCK5tOPyM JDYf+jmAJZCjJUGh5CAMp1qb0hin76j34LifTSOzOefYrV1d+tpsyR71j8uCQg1L5xhg em7Q== X-Gm-Message-State: AOUpUlHzTsx+i5F64hVMkXBOUGIthm1ePcFK4Vjw3pfjoHLieoXNlCFd 4eaI/BIAh8/NOp7fMcPOiGU6i/7ZQYc= X-Received: by 2002:a1c:10d4:: with SMTP id 203-v6mr768310wmq.158.1531898727100; Wed, 18 Jul 2018 00:25:27 -0700 (PDT) Received: from localhost ([49.248.170.255]) by smtp.gmail.com with ESMTPSA id w24-v6sm1221022wmc.15.2018.07.18.00.25.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Jul 2018 00:25:26 -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 v1 1/3] thermal: tsens: Rename variable Date: Wed, 18 Jul 2018 12:55:01 +0530 Message-Id: <45062f2bcfd0f20e604f663e3627dcedf01f0be5.1531898088.git.amit.kucheria@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 --- drivers/thermal/qcom/tsens-common.c | 6 +++--- drivers/thermal/qcom/tsens-v2.c | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/thermal/qcom/tsens-common.c b/drivers/thermal/qcom/tsens-common.c index c22dc18..25e7f24 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 f40150f..908e3dc 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) { -- 2.7.4