From: Zhang Rui <rui.zhang@intel.com>
To: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Cc: linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org,
Jason Cooper <jason@lakedaemon.net>, Andrew Lunn <andrew@lunn.ch>,
Nobuhiro Iwamatsu <iwamatsu@nigauri.org>,
Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
Gregory Clement <gregory.clement@free-electrons.com>,
Lior Amsalem <alior@marvell.com>
Subject: Re: [PATCH for 3.9] thermal: mvebu: Fix valid check for thermal register
Date: Tue, 26 Mar 2013 22:24:09 +0800 [thread overview]
Message-ID: <1364307849.2821.22.camel@rzhang1-mobl4> (raw)
In-Reply-To: <1363898527-3660-1-git-send-email-ezequiel.garcia@free-electrons.com>
On Thu, 2013-03-21 at 17:42 -0300, Ezequiel Garcia wrote:
> The correct value is obtain by first shifting the register by the offset,
> later applying the valid mask and finally invert the result.
> This check was lacking an extra parenthesis to be strictly correct.
>
> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
applied to thermal -next.
thanks,
rui
> ---
> I've taken this fix out of the thermal patchset,
> so we can apply it earlier on v3.9.
>
> drivers/thermal/kirkwood_thermal.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/thermal/kirkwood_thermal.c b/drivers/thermal/kirkwood_thermal.c
> index 65cb4f0..ee433b7 100644
> --- a/drivers/thermal/kirkwood_thermal.c
> +++ b/drivers/thermal/kirkwood_thermal.c
> @@ -41,8 +41,8 @@ static int kirkwood_get_temp(struct thermal_zone_device *thermal,
> reg = readl_relaxed(priv->sensor);
>
> /* Valid check */
> - if (!(reg >> KIRKWOOD_THERMAL_VALID_OFFSET) &
> - KIRKWOOD_THERMAL_VALID_MASK) {
> + if (!((reg >> KIRKWOOD_THERMAL_VALID_OFFSET) &
> + KIRKWOOD_THERMAL_VALID_MASK)) {
> dev_err(&thermal->device,
> "Temperature sensor reading not valid\n");
> return -EIO;
prev parent reply other threads:[~2013-03-26 14:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-21 20:42 [PATCH for 3.9] thermal: mvebu: Fix valid check for thermal register Ezequiel Garcia
2013-03-26 14:24 ` Zhang Rui [this message]
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=1364307849.2821.22.camel@rzhang1-mobl4 \
--to=rui.zhang@intel.com \
--cc=alior@marvell.com \
--cc=andrew@lunn.ch \
--cc=ezequiel.garcia@free-electrons.com \
--cc=gregory.clement@free-electrons.com \
--cc=iwamatsu@nigauri.org \
--cc=jason@lakedaemon.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-pm@vger.kernel.org \
--cc=thomas.petazzoni@free-electrons.com \
/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).