[PATCH v1 8/8] lmb: Rename _lmb_alloc_addr() to lmb_alloc_addr_flags()

Sam Protsenko semen.protsenko at linaro.org
Thu Dec 12 23:45:45 CET 2024


On Wed, Dec 11, 2024 at 4:55 AM Ilias Apalodimas
<ilias.apalodimas at linaro.org> wrote:
>
> 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.
>
> Signed-off-by: Ilias Apalodimas <ilias.apalodimas at linaro.org>
> ---

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

>  include/lmb.h | 2 +-
>  lib/lmb.c     | 7 +------
>  2 files changed, 2 insertions(+), 7 deletions(-)
>
> diff --git a/include/lmb.h b/include/lmb.h
> index d481972a6686..76fb82b197a9 100644
> --- a/include/lmb.h
> +++ b/include/lmb.h
> @@ -123,7 +123,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)
>  {
> --
> 2.45.2
>


More information about the U-Boot mailing list