aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorNiklas Cassel <[email protected]>2024-02-07 22:39:15 +0100
committerManivannan Sadhasivam <[email protected]>2024-02-09 22:39:46 +0530
commit84b51a6baeaf1ba85e024a5bf145382c02179013 (patch)
tree01fe76f3d7f112b9657939b854b3ed19b446a8f7 /tools/perf/scripts/python
parente891becdccaa9048b1ab91c08ad5722edd571806 (diff)
PCI: endpoint: Improve pci_epf_alloc_space() API
pci_epf_alloc_space() already performs checks on the requested BAR size, and will allocate and set epf_bar->size to a size higher than the requested BAR size if some constraint deems it necessary. However, there are additional checks done in the function drivers like pci-epf-test.c, other than the existing checks in this API. And similar checks are proposed to other endpoint function drivers, see: https://lore.kernel.org/linux-pci/[email protected] Having these checks scattered over different locations in multiple EPF drivers is not maintainable and makes the code hard to follow. Since pci_epf_alloc_space() already performs roundups and some checks, let's move the additional checks from pci-epf-test.c to pci_epf_alloc_space(). This makes the API more robust and also offloads the checks from the function drivers. Signed-off-by: Niklas Cassel <[email protected]> Reviewed-by: Manivannan Sadhasivam <[email protected]> Reviewed-by: Frank Li <[email protected]> Link: https://lore.kernel.org/r/[email protected] [mani: reworded commit message and fixed uninitialized 'dev' pointer issue] Signed-off-by: Manivannan Sadhasivam <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions