summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorGuodong Xu <guodong@riscstar.com>2026-05-05 09:53:34 -0400
committerMark Brown <broonie@kernel.org>2026-05-05 11:01:22 +0900
commit00cef7eb08c8b9af0978f667c77c6a30b71b7e22 (patch)
treedc23e5f0d7a9dd4fc7d7fb112048b55ab49999b0 /include/linux
parente4358093816df69b574a5632051801a881663d12 (diff)
spi: spacemit: add u64 cast to NSEC_PER_SEC to avoid 32-bit overflow
NSEC_PER_SEC expands to the long constant 1000000000L, so NSEC_PER_SEC * BITS_PER_BYTE (8 * 10^9) overflows on 32-bit-long architectures before the result reaches the u64 nsec_per_word. Promote the multiplication to u64 by casting the first operand, which is NSEC_PER_SEC. Fixes: efcd8b9d1111 ("spi: spacemit: introduce SpacemiT K1 SPI controller driver") Suggested-by: Alex Elder <elder@riscstar.com> Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202605050437.RS6mmV2b-lkp@intel.com/ Closes: https://lore.kernel.org/oe-kbuild-all/202605050317.Tf9j487w-lkp@intel.com/ Signed-off-by: Guodong Xu <guodong@riscstar.com> Link: https://patch.msgid.link/20260505-spi-spacemit-k1-fix-overflow-v1-1-77564c2e4e86@riscstar.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions