diff options
author | 2024-12-13 15:33:07 +0100 | |
---|---|---|
committer | 2024-12-18 21:52:16 +0000 | |
commit | 0e7faea1880c316c8f41987165b95f1db2544350 (patch) | |
tree | cd42937ff1a4b7b42fa231e0a3934334e9fb447b /scripts/lib/kdoc/kdoc_files.py | |
parent | PCI: endpoint: Add size check for fixed size BARs in pci_epc_set_bar() (diff) | |
download | linux-rng-0e7faea1880c316c8f41987165b95f1db2544350.tar.xz linux-rng-0e7faea1880c316c8f41987165b95f1db2544350.zip |
PCI: endpoint: Verify that requested BAR size is a power of two
When allocating a BAR using pci_epf_alloc_space(), there are checks that
round up the size to a power of two.
However, there is no check in pci_epc_set_bar() which verifies that the
requested BAR size is a power of two.
Add a power of two check in pci_epc_set_bar(), so that we don't need to
add such a check in each and every PCI endpoint controller driver.
Link: https://lore.kernel.org/r/20241213143301.4158431-14-cassel@kernel.org
Signed-off-by: Niklas Cassel <cassel@kernel.org>
Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_files.py')
0 files changed, 0 insertions, 0 deletions