lmb: Remove lmb_reserve_flags()
lmb_reserve() is just calling lmb_reserve_flags() with LMB_NONE.
There's not much we gain from this abstraction.
So let's remove the latter, add the flags argument to lmb_reserve()
and make the code a bit easier to follow.
Reviewed-by: Tom Rini <trini@konsulko.com>
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>
diff --git a/include/lmb.h b/include/lmb.h
index 3b911d5..3abe24d 100644
--- a/include/lmb.h
+++ b/include/lmb.h
@@ -80,18 +80,9 @@
long lmb_add(phys_addr_t base, phys_size_t size);
/**
- * lmb_reserve() - Reserve a memory region (with no special flags)
+ * lmb_reserve() - Reserve one region with a specific flags bitfield
* @base: Base address of the memory region
* @size: Size of the memory region
- *
- * Return: 0 on success, negative error code on failure.
- */
-long lmb_reserve(phys_addr_t base, phys_size_t size);
-
-/**
- * lmb_reserve_flags() - Reserve one region with a specific flags bitfield
- * @base: Base address of the memory region
- * @size: Size of the memory region
* @flags: Flags for the memory region
*
* Return:
@@ -99,8 +90,7 @@
* * %-EEXIST - The region is already added, and flags != LMB_NONE
* * %-1 - Failure
*/
-long lmb_reserve_flags(phys_addr_t base, phys_size_t size,
- u32 flags);
+long lmb_reserve(phys_addr_t base, phys_size_t size, u32 flags);
phys_addr_t lmb_alloc(phys_size_t size, ulong align);
phys_addr_t lmb_alloc_base(phys_size_t size, ulong align, phys_addr_t max_addr);