From: Heiko Stuebner <heiko@sntech.de>
To: Colin King <colin.king@canonical.com>,
Chris Zhong <zyw@rock-chips.com>, Daniel Vetter <daniel@ffwll.ch>,
Sandy Huang <hjc@rock-chips.com>,
linux-arm-kernel@lists.infradead.org,
Guenter Roeck <groeck@chromium.org>,
Sean Paul <seanpaul@chromium.org>,
David Airlie <airlied@linux.ie>,
dri-devel@lists.freedesktop.org,
linux-rockchip@lists.infradead.org
Cc: Heiko Stuebner <heiko@sntech.de>,
kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/rockchip: cdn-dp: fix sign extension on an int multiply for a u64 result
Date: Fri, 28 May 2021 20:55:53 +0200 [thread overview]
Message-ID: <162222814865.2904787.9681017201633439176.b4-ty@sntech.de> (raw)
In-Reply-To: <20200915162049.36434-1-colin.king@canonical.com>
On Tue, 15 Sep 2020 17:20:49 +0100, Colin King wrote:
> The variable bit_per_pix is a u8 and is promoted in the multiplication
> to an int type and then sign extended to a u64. If the result of the
> int multiplication is greater than 0x7fffffff then the upper 32 bits will
> be set to 1 as a result of the sign extension. Avoid this by casting
> tu_size_reg to u64 to avoid sign extension and also a potential overflow.
Applied, thanks!
[1/1] drm/rockchip: cdn-dp: fix sign extension on an int multiply for a u64 result
commit: ce0cb93a5adb283f577cd4661f511047b5e39028
Best regards,
--
Heiko Stuebner <heiko@sntech.de>
prev parent reply other threads:[~2021-05-28 18:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-15 16:20 [PATCH] drm/rockchip: cdn-dp: fix sign extension on an int multiply for a u64 result Colin King
2020-09-15 17:29 ` Guenter Roeck
2021-05-28 18:55 ` Heiko Stuebner [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=162222814865.2904787.9681017201633439176.b4-ty@sntech.de \
--to=heiko@sntech.de \
--cc=airlied@linux.ie \
--cc=colin.king@canonical.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=groeck@chromium.org \
--cc=hjc@rock-chips.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=seanpaul@chromium.org \
--cc=zyw@rock-chips.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).