diff options
author | Simon Glass <sjg@chromium.org> | 2024-10-21 10:19:26 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2024-10-25 14:22:24 -0600 |
commit | 41fecdc94e3b3714f33a28c139f61cfa48bf16f9 (patch) | |
tree | c43bea78417b8e4b4bab5fa9b79678b356312362 /common/board_r.c | |
parent | 09f5be613a7cc812c9c5865eb384d311990f7d6d (diff) |
common: Tidy up how malloc() is inited
The call to malloc() is a bit strange. The naming of the arguments
suggests that an address is passed, but in fact it is a pointer, at
least in the board_init_r() function and SPL equivalent.
Update it to work as described. Add a function comment as well.
Note that this does adjustment does not extend into the malloc()
implementation itself, apart from changing mem_malloc_init(), since
there are lots of casts and pointers and integers are used
interchangeably.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Diffstat (limited to 'common/board_r.c')
-rw-r--r-- | common/board_r.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/common/board_r.c b/common/board_r.c index e5f33f40643..8a19817fa39 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -204,8 +204,7 @@ static int initr_malloc(void) */ start = gd->relocaddr - TOTAL_MALLOC_LEN; gd_set_malloc_start(start); - mem_malloc_init((ulong)map_sysmem(start, TOTAL_MALLOC_LEN), - TOTAL_MALLOC_LEN); + mem_malloc_init(start, TOTAL_MALLOC_LEN); return 0; } |