diff options
author | Ilias Apalodimas <ilias.apalodimas@linaro.org> | 2024-12-18 09:02:36 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2024-12-30 13:21:55 -0600 |
commit | 3075708017dc2d1b735ed7c9556da6ff5070f14f (patch) | |
tree | c5dc6997a16545ae73033f3cacb19e6fd61e7152 /lib/lmb.c | |
parent | 15e0c5e390ffac7682193b7e1a615898b569deb1 (diff) |
lmb: Remove lmb_alloc_base_flags()
lmb_alloc_base() is just calling lmb_alloc_base_flags() with LMB_NONE.
There's not much we gain from this abstraction, so let's remove the
former add the flags argument to lmb_alloc_base() and make the code
a bit easier to follow.
Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
Tested-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Diffstat (limited to 'lib/lmb.c')
-rw-r--r-- | lib/lmb.c | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/lib/lmb.c b/lib/lmb.c index ffad7ec12eb..bdaaa634abd 100644 --- a/lib/lmb.c +++ b/lib/lmb.c @@ -731,24 +731,11 @@ static phys_addr_t _lmb_alloc_base(phys_size_t size, ulong align, phys_addr_t lmb_alloc(phys_size_t size, ulong align) { - return lmb_alloc_base(size, align, LMB_ALLOC_ANYWHERE); + return lmb_alloc_base(size, align, LMB_ALLOC_ANYWHERE, LMB_NONE); } -phys_addr_t lmb_alloc_base(phys_size_t size, ulong align, phys_addr_t max_addr) -{ - phys_addr_t alloc; - - alloc = _lmb_alloc_base(size, align, max_addr, LMB_NONE); - - if (alloc == 0) - printf("ERROR: Failed to allocate 0x%lx bytes below 0x%lx.\n", - (ulong)size, (ulong)max_addr); - - return alloc; -} - -phys_addr_t lmb_alloc_base_flags(phys_size_t size, ulong align, - phys_addr_t max_addr, uint flags) +phys_addr_t lmb_alloc_base(phys_size_t size, ulong align, phys_addr_t max_addr, + uint flags) { phys_addr_t alloc; |