From: Brian Norris <computersforpeace-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Caesar Wang <wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
Cc: Heiko Stuebner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>,
linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Eduardo Valentin
<edubezval-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
Zhang Rui <rui.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
lkp-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org
Subject: Re: [PATCH v4 06/10] thermal: rockchip: consistently use int for temperatures
Date: Wed, 2 Dec 2015 16:49:03 -0800 [thread overview]
Message-ID: <20151203004903.GA9543@google.com> (raw)
In-Reply-To: <565F8FFE.3080807-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
Hi Caesar,
On Thu, Dec 03, 2015 at 08:42:38AM +0800, Caesar Wang wrote:
> ? 2015?12?03? 02:38, Brian Norris ??:
>
> [.....]
> > if (thermal->tshut_temp > INT_MAX) {
> > CID 1341498: Integer handling issues (CONSTANT_EXPRESSION_RESULT)
> > "thermal->tshut_temp > 2147483647 /* (int)(~0U >> 1) */" is always false regardless of the values of its operands. This occurs as the logical operand of if.
> >
> >I don't think this condition is even useful any more, so maybe we should
> >just kill the 'if' block.
>
> See the patch to fix
> it.----->(https://patchwork.kernel.org/patch/7720601/)
> <https://patchwork.kernel.org/patch/7720601/>
- if (thermal->tshut_temp > INT_MAX) {
+ if (!(thermal->tshut_temp < INT_MAX)) {
Huh? That still doesn't make much sense. The condition is still
impossible, since thermal->tshut_temp is an int. You've just made it
slightly harder for static analyzers to notice the impossibility.
> This patch is merged into kernel 4.4-rc3.
No it isn't, and I'm glad. The patch is silly.
Brian
next prev parent reply other threads:[~2015-12-03 0:49 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-09 4:48 [PATCH v4 00/10] Better compatible for the rockchip thermal and support RK3368 SoCs Caesar Wang
[not found] ` <1447044542-30859-1-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2015-11-09 4:48 ` [PATCH v4 01/10] dt-bindings: rockchip-thermal: Support the RK3368 SoCs compatible Caesar Wang
2015-11-09 4:48 ` [PATCH v4 02/10] thermal: rockchip: better to compatible the driver for different SoCs Caesar Wang
2015-11-09 4:48 ` [PATCH v4 03/10] thermal: rockchip: trivial: fix typo in commit Caesar Wang
2015-11-09 4:48 ` [PATCH v4 04/10] thermal: rockchip: improve the conversion function Caesar Wang
2015-11-09 4:49 ` [PATCH v4 08/10] arm64: dts: Add the thermal data found on RK3368 Caesar Wang
2015-11-09 4:49 ` [PATCH v4 09/10] arm64: dts: Add main Thermal info to rk3368.dtsi Caesar Wang
[not found] ` <1447044542-30859-10-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2016-02-09 8:30 ` Heiko Stuebner
2016-02-15 3:36 ` Caesar Wang
2015-11-09 4:48 ` [PATCH v4 05/10] thermal: rockchip: Add the sort mode for adc value increment or decrement Caesar Wang
2015-11-09 4:48 ` [PATCH v4 06/10] thermal: rockchip: consistently use int for temperatures Caesar Wang
[not found] ` <1447044542-30859-7-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2015-12-02 18:38 ` Brian Norris
[not found] ` <565F8FFE.3080807@rock-chips.com>
[not found] ` <565F8FFE.3080807-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2015-12-03 0:49 ` Brian Norris [this message]
2015-12-03 1:16 ` Caesar Wang
2015-11-09 4:48 ` [PATCH v4 07/10] thermal: rockchip: Support the RK3368 SoCs in thermal driver Caesar Wang
2015-11-09 4:49 ` [PATCH v4 10/10] arm64: dts: Enable the Thermal on R88 board Caesar Wang
2015-11-12 18:29 ` [PATCH v4 00/10] Better compatible for the rockchip thermal and support RK3368 SoCs Eduardo Valentin
2015-11-12 18:31 ` Eduardo Valentin
[not found] ` <20151112183119.GA5289-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2015-11-21 16:41 ` Heiko Stuebner
2015-11-12 22:14 ` Heiko Stuebner
2015-11-14 6:31 ` Caesar Wang
[not found] ` <20151112182950.GB4361-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2015-11-14 6:30 ` Caesar Wang
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=20151203004903.GA9543@google.com \
--to=computersforpeace-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=edubezval-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=lkp-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=rui.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.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).