[PATCH][next][V2] rtc: msc313: Fix unintentional sign extension issues with left shift of a u16
Alexandre Belloni
alexandre.belloni at bootlin.com
Fri Oct 1 14:29:41 PDT 2021
On Tue, 28 Sep 2021 14:46:54 +0100, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> Shifting the u16 value returned by readw by 16 bits to the left
> will be promoted to a 32 bit signed int and then sign-extended
> to an unsigned long. If the top bit of the readw is set then
> the shifted value will be sign extended and the top 32 bits of
> the result will be set.
>
> [...]
Applied, thanks!
[1/1] rtc: msc313: Fix unintentional sign extension issues with left shift of a u16
commit: f3606687b447c41d28a011c98373b62b1cd52345
Best regards,
--
Alexandre Belloni <alexandre.belloni at bootlin.com>
More information about the linux-arm-kernel
mailing list