From patchwork Wed Jul 18 07:25:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 142248 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp211580ljj; Wed, 18 Jul 2018 00:25:31 -0700 (PDT) X-Google-Smtp-Source: AAOMgpefPIn4+FrfighNz2rxiyLjNev2tJ3xvTYIYpMB4k3V4iH/1a5z2ftXK9xVs2o49n+UBDxw X-Received: by 2002:a62:a018:: with SMTP id r24-v6mr4092744pfe.144.1531898731345; Wed, 18 Jul 2018 00:25:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531898731; cv=none; d=google.com; s=arc-20160816; b=p+h/plqGpMysnNGLLzxk7ZWtC/7OLeGdooeKVxtYtxv9ObjrfNEHiofYVP+WOV1Eh+ 9poI41Np5+DC4VeiS51s5i8qAs+LYhWEoBr1WiQWhTD3Eay5//K9Yn08MtrEp44iffNm SihTepWe40d3RRUV/A9AYVnkyF+PT0fcRlHqwosOAz64m2J6f7Pb6GePtXS9qSVRxZoz kRWaRNugjLZAJeq4X+hTSFDGQZE1ItT/LkyDu95cPdtvei+Ik52VK3hfoGEi2gwl7bj2 UR8Koj6LWb5gcuwAO5pn00vAFJdT996aY/XJ1EqDjraKZ9JJLa5BwbL6+1RhmeJSBpDn 86YA== 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=i4uDItidJsaaRyHuwWqCpIgeJ70dGPyp6AqrE9aBJFA=; b=N2LBTCuAWB5guijMyG4+FMkm+PmciA9Xy7Hu2cpnDD95bY/h6TMUPsEBuPyLQBWPmU 2NLsYIFjQrqoUL2x4qJ64UiX33BWlrTflNW1N9rwDZCv/x8t+QjjyVHgUaFTh6xnRkwW CDlaLbL6ziKpq4hJPLfs0Z7Jo4aKVZAxQ+Rhehx/d64Wob0HhfHimPLjBnx0G1QyEFlT ZWtXMl9HBXyrNtlFfZUOgifhiVJLT7R3VjaJ2clBiCR1pWByWWovg92hwGyLZoRWiMsI JcRKCc9iSSGmNuMBfBU7U54RXK0wTdgK7n+cf1V+3fHBA5DzNRBfBRFkXXcaWmlhXVex AtXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=OwrsM1z7; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=fail (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 u4-v6si2848365pgm.454.2018.07.18.00.25.31; Wed, 18 Jul 2018 00:25:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=OwrsM1z7; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729122AbeGRIBz (ORCPT + 13 others); Wed, 18 Jul 2018 04:01:55 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:50647 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729010AbeGRIBy (ORCPT ); Wed, 18 Jul 2018 04:01:54 -0400 Received: by mail-wm0-f68.google.com with SMTP id v25-v6so1704184wmc.0 for ; Wed, 18 Jul 2018 00:25:27 -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=B8973JVD0cw1CHhbpM3c5duwHZGhXLQvTqF++Jy8udWU6i0gMOhl26flPWPqLoIEob 2vgGUJHM7SVvt/OwNux38D4kvKTiw8NruTNTht5ZC+K0X8++2q0xgR0M1IGACGo2HeSm U6oMFsc8RT6Y7oTsK887bJcP/cWR/SOsCGhWA57wdcTe5b1zrRlRy7JTQvG4jZ0HrYMM SuLwYlQAsjtmP5ymi9dcUxHgxF2b37YADetqIfSMOOLqarfG5W8NxR/iaVTtgZryUZTw erzvfNDywcWP320tYJtbsDr5Ap39NzctR35CZjVdIOuQYq4AI2taN1D6545ZAjKhT5CW GFUw== X-Gm-Message-State: AOUpUlFr6HZi47KQWcUHJ+lsmMmh/awrhZNNXgMUl5HeO9tq2Gjf+1Te OKkIrECBreWpFwS76YOb9zcVjQ== 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-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@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(-) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Reviewed-by: Matthias Kaehlcke 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) {