linux/drivers/ntb/hw
Maciej Grochowski 2e4d5e8d86 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:21:30 -05:00
..
amd ntb_hw_amd: Add NTB PCI ID for new gen CPU 2025-05-02 07:59:20 +02:00
epf NTB: epf: Allow arbitrary BAR mapping 2025-11-13 15:34:34 -05:00
idt ntb: reduce stack usage in idt_scan_mws 2025-05-02 07:59:20 +02:00
intel ntb: intel: Fix using link status DB's 2025-04-10 14:39:32 +02:00
mscc ntb: ntb_hw_switchtec: Fix shift-out-of-bounds for 0 mw lut 2026-03-04 07:21:30 -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