lmb: Rename free_mem to available_mem

free_mem is a misnomer. We never update it with the free memory for
LMB. Instead, it describes all available memory and is checked against
used_mem to decide whether an area is free or not.

So let's rename this field to better match its usage.

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>
(cherry picked from commit 400c34db89)
This commit is contained in:
Ilias Apalodimas
2024-12-18 09:02:33 +02:00
committed by Simon Glass
parent 8e54e97f09
commit 8692e10965
4 changed files with 21 additions and 21 deletions

View File

@@ -130,7 +130,7 @@ static int lmb_test_dump_all(struct unit_test_state *uts)
struct lmb *lmb = lmb_get();
ut_assert_nextline("lmb_dump_all:");
ut_assertok(lmb_test_dump_region(uts, &lmb->free_mem, "memory"));
ut_assertok(lmb_test_dump_region(uts, &lmb->available_mem, "memory"));
ut_assertok(lmb_test_dump_region(uts, &lmb->used_mem, "reserved"));
return 0;

View File

@@ -65,7 +65,7 @@ static int setup_lmb_test(struct unit_test_state *uts, struct lmb *store,
ut_assertok(lmb_push(store));
lmb = lmb_get();
*mem_lstp = &lmb->free_mem;
*mem_lstp = &lmb->available_mem;
*used_lstp = &lmb->used_mem;
return 0;