Linux Power Management development
 help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano@oss.qualcomm.com>
To: liujing <liujing@cmss.chinamobile.com>,
	"Rafael J . Wysocki" <rafael@kernel.org>,
	Daniel Lezcano <daniel.lezcano@kernel.org>
Cc: Zhang Rui <rui.zhang@intel.com>,
	Lukasz Luba <lukasz.luba@arm.com>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tools thermal tmon: Fix signed shift UB in binding display
Date: Mon, 28 Sep 2026 18:39:02 +0200	[thread overview]
Message-ID: <65844a7f-62c0-4a68-8034-6f74a43e32e2@oss.qualcomm.com> (raw)
In-Reply-To: <20260903082858.5273-1-liujing@cmss.chinamobile.com>

On 9/3/26 10:28, liujing wrote:
> From: Liu Jing <liujing@cmss.chinamobile.com>
> 
> In the thermal zone binding display loop, the expression `(1 << j)`
> performs a signed integer shift. When j reaches 31, this sets the
> sign bit of a 32-bit signed integer, which is undefined behavior.
> 
> Fix it by using `(1U << j)` to perform an unsigned shift.
> 
> Signed-off-by: Liu Jing <liujing@cmss.chinamobile.com>
> ---
Applied, thanks

      reply	other threads:[~2026-09-28 16:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-03  8:28 [PATCH] tools thermal tmon: Fix signed shift UB in binding display liujing
2026-09-28 16:39 ` Daniel Lezcano [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=65844a7f-62c0-4a68-8034-6f74a43e32e2@oss.qualcomm.com \
    --to=daniel.lezcano@oss.qualcomm.com \
    --cc=daniel.lezcano@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=liujing@cmss.chinamobile.com \
    --cc=lukasz.luba@arm.com \
    --cc=rafael@kernel.org \
    --cc=rui.zhang@intel.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