diff mbox series

[3/5] lmb: staticise lmb_add_memory()

Message ID 20250501120239.199829-4-sughosh.ganu@linaro.org
State New
Headers show
Series lmb: use a single API for all allocations | expand

Commit Message

Sughosh Ganu May 1, 2025, 12:02 p.m. UTC
lmb_add_memory() is only called from the lmb module. Mark the function
as static.

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
---
 include/lmb.h | 8 --------
 lib/lmb.c     | 2 +-
 2 files changed, 1 insertion(+), 9 deletions(-)

Comments

Ilias Apalodimas May 2, 2025, 6:55 a.m. UTC | #1
On Thu May 1, 2025 at 3:02 PM EEST, Sughosh Ganu wrote:
> lmb_add_memory() is only called from the lmb module. Mark the function
> as static.
>
> Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
> ---
>  include/lmb.h | 8 --------
>  lib/lmb.c     | 2 +-
>  2 files changed, 1 insertion(+), 9 deletions(-)
>
> diff --git a/include/lmb.h b/include/lmb.h
> index be723d9162a..73df4e07248 100644
> --- a/include/lmb.h
> +++ b/include/lmb.h
> @@ -120,14 +120,6 @@ int lmb_allocate_mem(enum lmb_mem_type type, u64 align, phys_addr_t *addr,
>   */
>  int lmb_init(void);
>
> -/**
> - * lmb_add_memory() - Add memory range for LMB allocations.
> - *
> - * Add the entire available memory range to the pool of memory that
> - * can be used by the LMB module for allocations.
> - */
> -void lmb_add_memory(void);
> -
>  long lmb_add(phys_addr_t base, phys_size_t size);
>
>  phys_size_t lmb_get_free_size(phys_addr_t addr);
> diff --git a/lib/lmb.c b/lib/lmb.c
> index a21f9c72204..55aca306a90 100644
> --- a/lib/lmb.c
> +++ b/lib/lmb.c
> @@ -605,7 +605,7 @@ static __maybe_unused void lmb_reserve_common_spl(void)
>  	}
>  }
>
> -void lmb_add_memory(void)
> +static void lmb_add_memory(void)
>  {
>  	int i;
>  	phys_addr_t bank_end;

Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
diff mbox series

Patch

diff --git a/include/lmb.h b/include/lmb.h
index be723d9162a..73df4e07248 100644
--- a/include/lmb.h
+++ b/include/lmb.h
@@ -120,14 +120,6 @@  int lmb_allocate_mem(enum lmb_mem_type type, u64 align, phys_addr_t *addr,
  */
 int lmb_init(void);
 
-/**
- * lmb_add_memory() - Add memory range for LMB allocations.
- *
- * Add the entire available memory range to the pool of memory that
- * can be used by the LMB module for allocations.
- */
-void lmb_add_memory(void);
-
 long lmb_add(phys_addr_t base, phys_size_t size);
 
 phys_size_t lmb_get_free_size(phys_addr_t addr);
diff --git a/lib/lmb.c b/lib/lmb.c
index a21f9c72204..55aca306a90 100644
--- a/lib/lmb.c
+++ b/lib/lmb.c
@@ -605,7 +605,7 @@  static __maybe_unused void lmb_reserve_common_spl(void)
 	}
 }
 
-void lmb_add_memory(void)
+static void lmb_add_memory(void)
 {
 	int i;
 	phys_addr_t bank_end;