summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorIlias Apalodimas <[email protected]>2024-12-18 09:02:35 +0200
committerTom Rini <[email protected]>2024-12-30 13:21:55 -0600
commit15e0c5e390ffac7682193b7e1a615898b569deb1 (patch)
treeceba008ab7b9b5cff0450bfd24773a9b464ce32a /include
parentc207d6e3e31fd07885fa341209fcf90740e9f7d6 (diff)
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 <[email protected]> Tested-by: Sam Protsenko <[email protected]> Signed-off-by: Ilias Apalodimas <[email protected]>
Diffstat (limited to 'include')
-rw-r--r--include/lmb.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/include/lmb.h b/include/lmb.h
index 18030c610ab..e38af036a0d 100644
--- a/include/lmb.h
+++ b/include/lmb.h
@@ -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;
}
/**