Skip to content
Commit e9b3249a authored by Florinel Iordache's avatar Florinel Iordache Committed by Greg Kroah-Hartman
Browse files

fsl/fman: use 32-bit unsigned integer



[ Upstream commit 99f47abd ]

Potentially overflowing expression (ts_freq << 16 and intgr << 16)
declared as type u32 (32-bit unsigned) is evaluated using 32-bit
arithmetic and then used in a context that expects an expression of
type u64 (64-bit unsigned) which ultimately is used as 16-bit
unsigned by typecasting to u16. Fixed by using an unsigned 32-bit
integer since the value is truncated anyway in the end.

Fixes: 414fd46e ("fsl/fman: Add FMan support")
Signed-off-by: default avatarFlorinel Iordache <florinel.iordache@nxp.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 8c68da19
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment