[U-Boot] [PATCH 1/2] lib: lmb: rename lmb_get_unreserved_size to lmb_get_free_size

Simon Goldschmidt simon.k.r.goldschmidt at gmail.com
Mon Jan 21 19:29:55 UTC 2019


As a follow-up, change the name of the newly introduced function
'lmb_get_unreserved_size' to 'lmb_get_free_size', which is more
appropriate.

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt at gmail.com>
---

 include/lmb.h | 2 +-
 lib/lmb.c     | 2 +-
 net/tftp.c    | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/lmb.h b/include/lmb.h
index 1bb003e35e..e87c0b0ada 100644
--- a/include/lmb.h
+++ b/include/lmb.h
@@ -40,7 +40,7 @@ extern phys_addr_t __lmb_alloc_base(struct lmb *lmb, phys_size_t size, ulong ali
 			      phys_addr_t max_addr);
 extern phys_addr_t lmb_alloc_addr(struct lmb *lmb, phys_addr_t base,
 				  phys_size_t size);
-extern phys_size_t lmb_get_unreserved_size(struct lmb *lmb, phys_addr_t addr);
+extern phys_size_t lmb_get_free_size(struct lmb *lmb, phys_addr_t addr);
 extern int lmb_is_reserved(struct lmb *lmb, phys_addr_t addr);
 extern long lmb_free(struct lmb *lmb, phys_addr_t base, phys_size_t size);
 
diff --git a/lib/lmb.c b/lib/lmb.c
index 3407705fa7..2efb48c1dc 100644
--- a/lib/lmb.c
+++ b/lib/lmb.c
@@ -353,7 +353,7 @@ phys_addr_t lmb_alloc_addr(struct lmb *lmb, phys_addr_t base, phys_size_t size)
 }
 
 /* Return number of bytes from a given address that are free */
-phys_size_t lmb_get_unreserved_size(struct lmb *lmb, phys_addr_t addr)
+phys_size_t lmb_get_free_size(struct lmb *lmb, phys_addr_t addr)
 {
 	int i;
 	long j;
diff --git a/net/tftp.c b/net/tftp.c
index a9335b1b7e..58db451eee 100644
--- a/net/tftp.c
+++ b/net/tftp.c
@@ -726,7 +726,7 @@ static int tftp_init_load_addr(void)
 	lmb_init_and_reserve(&lmb, gd->bd->bi_dram[0].start,
 			     gd->bd->bi_dram[0].size, (void *)gd->fdt_blob);
 
-	max_size = lmb_get_unreserved_size(&lmb, load_addr);
+	max_size = lmb_get_free_size(&lmb, load_addr);
 	if (!max_size)
 		return -1;
 
-- 
2.17.1



More information about the U-Boot mailing list