lmb: Remove lmb_alloc_addr_flags()
lmb_alloc_addr() is just calling lmb_alloc_addr_flags() with LMB_NONE There's not much we gain from this abstraction, so let's remove the latter, add a flags argument to lmb_alloc_addr() 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:

committed by
Tom Rini

parent
c207d6e3e3
commit
15e0c5e390
@@ -94,7 +94,6 @@ 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_addr_t lmb_alloc_addr(phys_addr_t base, phys_size_t size);
|
||||
phys_size_t lmb_get_free_size(phys_addr_t addr);
|
||||
|
||||
/**
|
||||
@@ -115,8 +114,8 @@ phys_addr_t lmb_alloc_base_flags(phys_size_t size, ulong align,
|
||||
phys_addr_t max_addr, uint flags);
|
||||
|
||||
/**
|
||||
* lmb_alloc_addr_flags() - Allocate specified memory address with specified
|
||||
* attributes
|
||||
* lmb_alloc_addr() - Allocate specified memory address with specified attributes
|
||||
*
|
||||
* @base: Base Address requested
|
||||
* @size: Size of the region requested
|
||||
* @flags: Memory region attributes to be set
|
||||
@@ -127,8 +126,7 @@ phys_addr_t lmb_alloc_base_flags(phys_size_t size, ulong align,
|
||||
*
|
||||
* Return: Base address on success, 0 on error.
|
||||
*/
|
||||
phys_addr_t lmb_alloc_addr_flags(phys_addr_t base, phys_size_t size,
|
||||
uint flags);
|
||||
phys_addr_t lmb_alloc_addr(phys_addr_t base, phys_size_t size, uint flags);
|
||||
|
||||
/**
|
||||
* lmb_is_reserved_flags() - Test if address is in reserved region with flag
|
||||
@@ -166,7 +164,7 @@ void lmb_pop(struct lmb *store);
|
||||
|
||||
static inline int lmb_read_check(phys_addr_t addr, phys_size_t len)
|
||||
{
|
||||
return lmb_alloc_addr(addr, len) == addr ? 0 : -1;
|
||||
return lmb_alloc_addr(addr, len, LMB_NONE) == addr ? 0 : -1;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user