diff mbox series

[v3,18/27] lmb: remove the unused board_lmb_reserve() function

Message ID 20240821105839.2870293-19-sughosh.ganu@linaro.org
State New
Headers show
Series Make LMB memory map global and persistent | expand

Commit Message

Sughosh Ganu Aug. 21, 2024, 10:58 a.m. UTC
The board_lmb_reserve() function is not being used, and currently
there is only an empty weak function defined. Remove this unused
function.

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
---
Changes since V2: New patch

 include/lmb.h | 2 --
 lib/lmb.c     | 6 ------
 2 files changed, 8 deletions(-)

Comments

Simon Glass Aug. 23, 2024, 8:47 p.m. UTC | #1
On Wed, 21 Aug 2024 at 05:00, Sughosh Ganu <sughosh.ganu@linaro.org> wrote:
>
> The board_lmb_reserve() function is not being used, and currently
> there is only an empty weak function defined. Remove this unused
> function.
>
> Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
> ---
> Changes since V2: New patch
>
>  include/lmb.h | 2 --
>  lib/lmb.c     | 6 ------
>  2 files changed, 8 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>

One less weak function!


>
> diff --git a/include/lmb.h b/include/lmb.h
> index 6e435bd35c..79bd2457d3 100644
> --- a/include/lmb.h
> +++ b/include/lmb.h
> @@ -107,8 +107,6 @@ long lmb_free(phys_addr_t base, phys_size_t size);
>  void lmb_dump_all(void);
>  void lmb_dump_all_force(void);
>
> -void board_lmb_reserve(void);
> -
>  #if CONFIG_IS_ENABLED(UNIT_TEST)
>  struct lmb *lmb_get(void);
>  int lmb_push(struct lmb *store);
> diff --git a/lib/lmb.c b/lib/lmb.c
> index 1116b2b868..11959760b6 100644
> --- a/lib/lmb.c
> +++ b/lib/lmb.c
> @@ -221,7 +221,6 @@ static void lmb_reserve_uboot_region(void)
>
>  static void lmb_reserve_common(void *fdt_blob)
>  {
> -       board_lmb_reserve();
>         lmb_reserve_uboot_region();
>
>         if (CONFIG_IS_ENABLED(OF_LIBFDT) && fdt_blob)
> @@ -688,11 +687,6 @@ int lmb_is_reserved_flags(phys_addr_t addr, int flags)
>         return 0;
>  }
>
> -__weak void board_lmb_reserve(void)
> -{
> -       /* please define platform specific board_lmb_reserve() */
> -}
> -
>  static int lmb_setup(void)
>  {
>         bool ret;
> --
> 2.34.1
>
Ilias Apalodimas Aug. 26, 2024, 8:23 a.m. UTC | #2
On Wed, 21 Aug 2024 at 14:00, Sughosh Ganu <sughosh.ganu@linaro.org> wrote:
>
> The board_lmb_reserve() function is not being used, and currently
> there is only an empty weak function defined. Remove this unused
> function.
>
> Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
> ---
> Changes since V2: New patch
>
>  include/lmb.h | 2 --
>  lib/lmb.c     | 6 ------
>  2 files changed, 8 deletions(-)
>
> diff --git a/include/lmb.h b/include/lmb.h
> index 6e435bd35c..79bd2457d3 100644
> --- a/include/lmb.h
> +++ b/include/lmb.h
> @@ -107,8 +107,6 @@ long lmb_free(phys_addr_t base, phys_size_t size);
>  void lmb_dump_all(void);
>  void lmb_dump_all_force(void);
>
> -void board_lmb_reserve(void);
> -
>  #if CONFIG_IS_ENABLED(UNIT_TEST)
>  struct lmb *lmb_get(void);
>  int lmb_push(struct lmb *store);
> diff --git a/lib/lmb.c b/lib/lmb.c
> index 1116b2b868..11959760b6 100644
> --- a/lib/lmb.c
> +++ b/lib/lmb.c
> @@ -221,7 +221,6 @@ static void lmb_reserve_uboot_region(void)
>
>  static void lmb_reserve_common(void *fdt_blob)
>  {
> -       board_lmb_reserve();
>         lmb_reserve_uboot_region();
>
>         if (CONFIG_IS_ENABLED(OF_LIBFDT) && fdt_blob)
> @@ -688,11 +687,6 @@ int lmb_is_reserved_flags(phys_addr_t addr, int flags)
>         return 0;
>  }
>
> -__weak void board_lmb_reserve(void)
> -{
> -       /* please define platform specific board_lmb_reserve() */
> -}
> -
>  static int lmb_setup(void)
>  {
>         bool ret;
> --
> 2.34.1
>

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

Patch

diff --git a/include/lmb.h b/include/lmb.h
index 6e435bd35c..79bd2457d3 100644
--- a/include/lmb.h
+++ b/include/lmb.h
@@ -107,8 +107,6 @@  long lmb_free(phys_addr_t base, phys_size_t size);
 void lmb_dump_all(void);
 void lmb_dump_all_force(void);
 
-void board_lmb_reserve(void);
-
 #if CONFIG_IS_ENABLED(UNIT_TEST)
 struct lmb *lmb_get(void);
 int lmb_push(struct lmb *store);
diff --git a/lib/lmb.c b/lib/lmb.c
index 1116b2b868..11959760b6 100644
--- a/lib/lmb.c
+++ b/lib/lmb.c
@@ -221,7 +221,6 @@  static void lmb_reserve_uboot_region(void)
 
 static void lmb_reserve_common(void *fdt_blob)
 {
-	board_lmb_reserve();
 	lmb_reserve_uboot_region();
 
 	if (CONFIG_IS_ENABLED(OF_LIBFDT) && fdt_blob)
@@ -688,11 +687,6 @@  int lmb_is_reserved_flags(phys_addr_t addr, int flags)
 	return 0;
 }
 
-__weak void board_lmb_reserve(void)
-{
-	/* please define platform specific board_lmb_reserve() */
-}
-
 static int lmb_setup(void)
 {
 	bool ret;