lmb: Remove lmb_alloc_base_flags()

lmb_alloc_base() is just calling lmb_alloc_base_flags() with LMB_NONE.
There's not much we gain from this abstraction, so let's remove the
former add the flags argument to lmb_alloc_base() and make the code
a bit easier to follow.

Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
Tested-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
This commit is contained in:
Ilias Apalodimas
2024-12-18 09:02:36 +02:00
committed by Tom Rini
parent 15e0c5e390
commit 3075708017
6 changed files with 26 additions and 35 deletions

View File

@@ -93,11 +93,10 @@ long lmb_add(phys_addr_t base, phys_size_t size);
long lmb_reserve(phys_addr_t base, phys_size_t size, u32 flags);
phys_addr_t lmb_alloc(phys_size_t size, ulong align);
phys_addr_t lmb_alloc_base(phys_size_t size, ulong align, phys_addr_t max_addr);
phys_size_t lmb_get_free_size(phys_addr_t addr);
/**
* lmb_alloc_base_flags() - Allocate specified memory region with specified
* lmb_alloc_base() - Allocate specified memory region with specified
* attributes
* @size: Size of the region requested
* @align: Alignment of the memory region requested
@@ -110,8 +109,8 @@ phys_size_t lmb_get_free_size(phys_addr_t addr);
*
* Return: Base address on success, 0 on error.
*/
phys_addr_t lmb_alloc_base_flags(phys_size_t size, ulong align,
phys_addr_t max_addr, uint flags);
phys_addr_t lmb_alloc_base(phys_size_t size, ulong align, phys_addr_t max_addr,
uint flags);
/**
* lmb_alloc_addr() - Allocate specified memory address with specified attributes