diff options
author | Ilpo Järvinen <[email protected]> | 2024-05-07 13:25:20 +0300 |
---|---|---|
committer | Bjorn Helgaas <[email protected]> | 2024-05-28 11:14:14 -0500 |
commit | 094c0ce5451dd6232938e307d6f259e76571a778 (patch) | |
tree | 106d84619569b4c617d37147e361ec1fdc8d53da /drivers/pci/controller/dwc | |
parent | 4eed3dd7116814c82630b0f1b0f73fa96707134f (diff) |
resource: Handle simple alignment inside __find_resource_space()
allocate_resource() accepts ->alignf() callback to perform custom alignment
beyond constraint->align. If alignf is NULL, simple_align_resource() is
used which only returns avail->start (no change).
Using avail->start directly is natural and can be done with a conditional
in __find_resource_space() instead which avoids unnecessarily using
callback. It makes the code inside __find_resource_space() more obvious and
removes the need for the caller to provide constraint->alignf
unnecessarily.
This is preparation for exporting find_resource_space().
Link: https://lore.kernel.org/r/[email protected]
Tested-by: Lidong Wang <[email protected]>
Signed-off-by: Ilpo Järvinen <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
Reviewed-by: Mika Westerberg <[email protected]>
Diffstat (limited to 'drivers/pci/controller/dwc')
0 files changed, 0 insertions, 0 deletions