[RFC PATCH 4/7] lmb: Remove lmb_add_region()
Heinrich Schuchardt
xypron.glpk at gmx.de
Sun Dec 8 12:52:18 CET 2024
Am 8. Dezember 2024 11:52:07 MEZ schrieb Ilias Apalodimas <ilias.apalodimas at linaro.org>:
>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().
>
>Signed-off-by: Ilias Apalodimas <ilias.apalodimas at linaro.org>
>---
> lib/lmb.c | 8 +-------
> 1 file changed, 1 insertion(+), 7 deletions(-)
>
>diff --git a/lib/lmb.c b/lib/lmb.c
>index ffdd23d87b9b..56e005308dde 100644
>--- a/lib/lmb.c
>+++ b/lib/lmb.c
>@@ -640,19 +640,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. */
This comment should be moved to lmb.h.
Reviewed-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
> 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;
>
More information about the U-Boot
mailing list