diff mbox series

[v1,5/8] lmb: Remove lmb_add_region()

Message ID 20241211105504.453234-6-ilias.apalodimas@linaro.org
State Superseded
Headers show
Series Cleanup the LMB subsystem | expand

Commit Message

Ilias Apalodimas Dec. 11, 2024, 10:54 a.m. UTC
There's no point defining a function that's called only once just to
avoid passing the flags. Remove the wrapper and just call
lmb_add_region_flags().

Acked-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
---
 lib/lmb.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

Comments

Sam Protsenko Dec. 12, 2024, 10:17 p.m. UTC | #1
On Wed, Dec 11, 2024 at 4:55 AM Ilias Apalodimas
<ilias.apalodimas@linaro.org> wrote:
>
> There's no point defining a function that's called only once just to
> avoid passing the flags. Remove the wrapper and just call
> lmb_add_region_flags().
>
> Acked-by: Sughosh Ganu <sughosh.ganu@linaro.org>
> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
> ---

Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>

>  lib/lmb.c | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/lib/lmb.c b/lib/lmb.c
> index da960e422ada..659581f13f20 100644
> --- a/lib/lmb.c
> +++ b/lib/lmb.c
> @@ -632,19 +632,13 @@ void lmb_add_memory(void)
>         }
>  }
>
> -static long lmb_add_region(struct alist *lmb_rgn_lst, phys_addr_t base,
> -                          phys_size_t size)
> -{
> -       return lmb_add_region_flags(lmb_rgn_lst, base, size, LMB_NONE);
> -}
> -
>  /* This routine may be called with relocation disabled. */
>  long lmb_add(phys_addr_t base, phys_size_t size)
>  {
>         long ret;
>         struct alist *lmb_rgn_lst = &lmb.available_mem;
>
> -       ret = lmb_add_region(lmb_rgn_lst, base, size);
> +       ret = lmb_add_region_flags(lmb_rgn_lst, base, size, LMB_NONE);
>         if (ret)
>                 return ret;
>
> --
> 2.45.2
>
diff mbox series

Patch

diff --git a/lib/lmb.c b/lib/lmb.c
index da960e422ada..659581f13f20 100644
--- a/lib/lmb.c
+++ b/lib/lmb.c
@@ -632,19 +632,13 @@  void lmb_add_memory(void)
 	}
 }
 
-static long lmb_add_region(struct alist *lmb_rgn_lst, phys_addr_t base,
-			   phys_size_t size)
-{
-	return lmb_add_region_flags(lmb_rgn_lst, base, size, LMB_NONE);
-}
-
 /* This routine may be called with relocation disabled. */
 long lmb_add(phys_addr_t base, phys_size_t size)
 {
 	long ret;
 	struct alist *lmb_rgn_lst = &lmb.available_mem;
 
-	ret = lmb_add_region(lmb_rgn_lst, base, size);
+	ret = lmb_add_region_flags(lmb_rgn_lst, base, size, LMB_NONE);
 	if (ret)
 		return ret;