mtd: lpddr_cmds: Add literal suffix
authorDenis Arefev <arefev@swemel.ru>
Thu, 24 Aug 2023 13:02:15 +0000 (16:02 +0300)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 11 Sep 2023 15:50:42 +0000 (17:50 +0200)
commit8ffd18a6744b18ff9b58abf7261aaccd78be98cf
treed5f78fcf5371e1dac1979dd8c663d156b21a4692
parent0bb80ecc33a8fb5a682236443c1e740d5c917d1d
mtd: lpddr_cmds: Add literal suffix

The value of an arithmetic expression
1 << lpddr->qinfo->DevSizeShift is subject to overflow
due to a failure to cast operands to a larger data
type before performing arithmetic

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Denis Arefev <arefev@swemel.ru>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20230824130215.10396-1-arefev@swemel.ru
drivers/mtd/lpddr/lpddr_cmds.c