diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2025-09-24 22:11:40 +0900 |
---|---|---|
committer | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2025-09-24 22:19:15 +0900 |
commit | 8ec6a8ec23b9529d6203cab50a22fab3a5fd0d80 (patch) | |
tree | 6dc8dcdc21b8b16081300e2bf16a5925283ac628 /rust/kernel/irq/request.rs | |
parent | 19e73f65940d3d3357c637f3d7e19a59305a748f (diff) |
firewire: core: suppress overflow warning when computing jiffies from isochronous cycle
The multiplication by USEC_PER_SEC (=1000000L) may trigger an overflow
warning with 32 bit storage. In the case of the subsystem the input value
ranges between 800 and 16000, thus the result always fits within 32 bit
storage.
This commit suppresses the warning by using widening conversion to 64 bit
storage before multiplication, then using narrowing conversion to 32 bit
storage.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202509170136.b5ZHaNAV-lkp@intel.com/
Fixes: 379b870c28c6 ("firewire: core: use helper macros instead of direct access to HZ")
Link: https://lore.kernel.org/r/20250924131140.261686-1-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Diffstat (limited to 'rust/kernel/irq/request.rs')
0 files changed, 0 insertions, 0 deletions