From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Amit Kucheria <amit.kucheria@linaro.org>
Cc: linux-kernel@vger.kernel.org, rnayak@codeaurora.org,
linux-arm-msm@vger.kernel.org, edubezval@gmail.com,
smohanad@codeaurora.org, andy.gross@linaro.org,
dianders@chromium.org, mka@chromium.org,
Zhang Rui <rui.zhang@intel.com>,
linux-pm@vger.kernel.org
Subject: Re: [PATCH v2 1/3] thermal: tsens: Rename variable
Date: Thu, 26 Jul 2018 09:16:20 -0700 [thread overview]
Message-ID: <20180726161620.GA5450@tuxbook-pro> (raw)
In-Reply-To: <5160b58d1d14b87b84ea49adc804afbefb792c34.1532600791.git.amit.kucheria@linaro.org>
On Thu 26 Jul 03:33 PDT 2018, Amit Kucheria wrote:
> We're actually reading the temperature from the status register. Fix the
> variable name to reflect that.
>
> Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
> Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Regards,
Bjorn
> ---
> 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 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) {
> --
> 2.17.GIT
>
next prev parent reply other threads:[~2018-07-26 16:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-26 10:33 [PATCH v2 0/3] thermal: tsens: bugfixes, cleanups Amit Kucheria
2018-07-26 10:33 ` [PATCH v2 1/3] thermal: tsens: Rename variable Amit Kucheria
2018-07-26 16:16 ` Bjorn Andersson [this message]
2018-07-26 10:33 ` [PATCH v2 2/3] thermal: tsens: switch from of_iomap() to devm_ioremap_resource() Amit Kucheria
2018-07-26 16:36 ` Bjorn Andersson
2018-07-26 10:33 ` [PATCH v2 3/3] thermal: tsens: Fix negative temperature reporting Amit Kucheria
2018-07-26 16:41 ` Bjorn Andersson
2018-07-26 21:03 ` [PATCH v2 0/3] thermal: tsens: bugfixes, cleanups Eduardo Valentin
2018-07-26 22:12 ` Amit Kucheria
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180726161620.GA5450@tuxbook-pro \
--to=bjorn.andersson@linaro.org \
--cc=amit.kucheria@linaro.org \
--cc=andy.gross@linaro.org \
--cc=dianders@chromium.org \
--cc=edubezval@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mka@chromium.org \
--cc=rnayak@codeaurora.org \
--cc=rui.zhang@intel.com \
--cc=smohanad@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).