linux/drivers/ntb/hw
Maciej Grochowski a133e3caf8 ntb: ntb_hw_switchtec: Fix shift-out-of-bounds for 0 mw lut
[ Upstream commit 186615f885 ]

Number of MW LUTs depends on NTB configuration and can be set to zero,
in such scenario rounddown_pow_of_two will cause undefined behaviour and
should not be performed.
This patch ensures that rounddown_pow_of_two is called on valid value.

Signed-off-by: Maciej Grochowski <Maciej.Grochowski@sony.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2026-03-04 07:20:43 -05:00
..
amd ntb_hw_amd: Update amd_ntb_get_link_status to support latest generation secondary topology 2025-09-22 09:35:20 -04:00
epf NTB: epf: Add Renesas rcar support 2025-09-22 09:35:21 -04:00
idt ntb: reduce stack usage in idt_scan_mws 2025-03-18 13:34:59 -04:00
intel ntb: intel: Fix using link status DB's 2025-03-18 10:22:48 -04:00
mscc ntb: ntb_hw_switchtec: Fix shift-out-of-bounds for 0 mw lut 2026-03-04 07:20:43 -05:00
Kconfig NTB: Add support for EPF PCI Non-Transparent Bridge 2021-02-23 14:12:53 -06:00
Makefile NTB: Add support for EPF PCI Non-Transparent Bridge 2021-02-23 14:12:53 -06:00