From: "Zhang, Rui" <rui.zhang@intel.com>
To: "yang.lee@linux.alibaba.com" <yang.lee@linux.alibaba.com>,
"rafael@kernel.org" <rafael@kernel.org>
Cc: "linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
"daniel.lezcano@linaro.org" <daniel.lezcano@linaro.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"amitk@kernel.org" <amitk@kernel.org>,
"abaci@linux.alibaba.com" <abaci@linux.alibaba.com>
Subject: Re: [PATCH -next] thermal: Fix unsigned comparison with less than zero
Date: Fri, 6 Jan 2023 07:03:15 +0000 [thread overview]
Message-ID: <057bd9fa05f1bfdf10858f23506856f6376c9f8f.camel@intel.com> (raw)
In-Reply-To: <20230106005951.100479-1-yang.lee@linux.alibaba.com>
On Fri, 2023-01-06 at 08:59 +0800, Yang Li wrote:
> The return value from the call to intel_tcc_get_tjmax() is int, which
> can
> be a negative error code. However, the return value is being assigned
> to
> an u32 variable 'tj_max', so making 'tj_max' an int.
>
> Eliminate the following warning:
> ./drivers/thermal/intel/intel_soc_dts_iosf.c:394:5-11: WARNING:
> Unsigned expression compared with zero: tj_max < 0
>
> Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3637
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Thanks for catching this issue.
Acked-by: Zhang Rui <rui.zhang@intel.com>
thanks,
rui
> ---
> drivers/thermal/intel/intel_soc_dts_iosf.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/thermal/intel/intel_soc_dts_iosf.c
> b/drivers/thermal/intel/intel_soc_dts_iosf.c
> index 2138693d8afd..8c26f7b2316b 100644
> --- a/drivers/thermal/intel/intel_soc_dts_iosf.c
> +++ b/drivers/thermal/intel/intel_soc_dts_iosf.c
> @@ -380,7 +380,7 @@ struct intel_soc_dts_sensors
> *intel_soc_dts_iosf_init(
> {
> struct intel_soc_dts_sensors *sensors;
> bool notification;
> - u32 tj_max;
> + int tj_max;
> int ret;
> int i;
>
next prev parent reply other threads:[~2023-01-06 7:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-06 0:59 [PATCH -next] thermal: Fix unsigned comparison with less than zero Yang Li
2023-01-06 7:03 ` Zhang, Rui [this message]
2023-01-12 19:23 ` Rafael J. Wysocki
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=057bd9fa05f1bfdf10858f23506856f6376c9f8f.camel@intel.com \
--to=rui.zhang@intel.com \
--cc=abaci@linux.alibaba.com \
--cc=amitk@kernel.org \
--cc=daniel.lezcano@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=yang.lee@linux.alibaba.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).