summaryrefslogtreecommitdiff
path: root/include/uapi/linux/byteorder
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2019-02-06 09:50:53 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-01-27 14:50:20 +0100
commit4260a44a7d4e54faa974cb21d42e9ae752b52392 (patch)
tree68b907984cfbddda14f9f6a50ec61383be46df8f /include/uapi/linux/byteorder
parent558dac2418b6d8001bc6c3416380a90b50773f57 (diff)
rtc: 88pm860x: fix unintended sign extension
[ Upstream commit dc9e47160626cdb58d5c39a4f43dcfdb27a5c004 ] Shifting a u8 by 24 will cause the value to be promoted to an integer. If the top bit of the u8 is set then the following conversion to an unsigned long will sign extend the value causing the upper 32 bits to be set in the result. Fix this by casting the u8 value to an unsigned long before the shift. Detected by CoverityScan, CID#144925-144928 ("Unintended sign extension") Fixes: 008b30408c40 ("mfd: Add rtc support to 88pm860x") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/uapi/linux/byteorder')
0 files changed, 0 insertions, 0 deletions