aboutsummaryrefslogtreecommitdiff
path: root/drivers/fpga/fpga-bridge.c
diff options
context:
space:
mode:
authorDamien Le Moal <[email protected]>2024-10-12 20:32:42 +0900
committerManivannan Sadhasivam <[email protected]>2024-10-12 17:25:54 +0530
commit2314c6ffe8113ac3c22c8112fa9623e30eec6c4a (patch)
treeaa7d7d7f26dd4b31407d58e34810c458427273bf /drivers/fpga/fpga-bridge.c
parentca3c342fb3c76eee739a1cfc4ff59841722ebee7 (diff)
PCI: endpoint: Improve pci_epc_mem_alloc_addr()
There is no point in attempting to allocate memory from an endpoint controller memory window if the requested size is larger than the memory window size. Add a check to skip bitmap_find_free_region() calls for such case. This check can be done without the mem->lock mutex held as memory window sizes are constant and never modified at runtime. Also change the final return to return NULL to simplify the code. Signed-off-by: Damien Le Moal <[email protected]> Reviewed-by: Niklas Cassel <[email protected]> Reviewed-by: Manivannan Sadhasivam <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Manivannan Sadhasivam <[email protected]>
Diffstat (limited to 'drivers/fpga/fpga-bridge.c')
0 files changed, 0 insertions, 0 deletions