diff mbox series

[v2,8/8] lmb: Rename _lmb_alloc_addr() to lmb_alloc_addr_flags()

Message ID 20241218070251.686383-9-ilias.apalodimas@linaro.org
State New
Headers show
Series Cleanup the LMB subsystem | expand

Commit Message

Ilias Apalodimas Dec. 18, 2024, 7:02 a.m. UTC
lmb_alloc_addr_flags() is a wrapper for _lmb_alloc_addr() and it's the
only function using it. Rename _lmb_alloc_addr() to lmb_alloc_addr_flags()
and remove the wrapper.

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>
---
 include/lmb.h | 2 +-
 lib/lmb.c     | 7 +------
 2 files changed, 2 insertions(+), 7 deletions(-)
diff mbox series

Patch

diff --git a/include/lmb.h b/include/lmb.h
index a0e666a1f7c3..d9d7435a431e 100644
--- a/include/lmb.h
+++ b/include/lmb.h
@@ -125,7 +125,7 @@  phys_addr_t lmb_alloc_base(phys_size_t size, ulong align, phys_addr_t max_addr,
  *
  * Return: Base address on success, 0 on error.
  */
-phys_addr_t lmb_alloc_addr(phys_addr_t base, phys_size_t size, uint flags);
+phys_addr_t lmb_alloc_addr(phys_addr_t base, phys_size_t size, u32 flags);
 
 /**
  * lmb_is_reserved_flags() - Test if address is in reserved region with flag
diff --git a/lib/lmb.c b/lib/lmb.c
index bdaaa634abd1..7ca44591e1d7 100644
--- a/lib/lmb.c
+++ b/lib/lmb.c
@@ -748,7 +748,7 @@  phys_addr_t lmb_alloc_base(phys_size_t size, ulong align, phys_addr_t max_addr,
 	return alloc;
 }
 
-static phys_addr_t _lmb_alloc_addr(phys_addr_t base, phys_size_t size, u32 flags)
+phys_addr_t lmb_alloc_addr(phys_addr_t base, phys_size_t size, u32 flags)
 {
 	long rgn;
 	struct lmb_region *lmb_memory = lmb.available_mem.data;
@@ -772,11 +772,6 @@  static phys_addr_t _lmb_alloc_addr(phys_addr_t base, phys_size_t size, u32 flags
 	return 0;
 }
 
-phys_addr_t lmb_alloc_addr(phys_addr_t base, phys_size_t size, uint flags)
-{
-	return _lmb_alloc_addr(base, size, flags);
-}
-
 /* Return number of bytes from a given address that are free */
 phys_size_t lmb_get_free_size(phys_addr_t addr)
 {