[v2,1/4] fdtdec: Deduplicate iterator function
Simon Glass
sjg at chromium.org
Wed Apr 1 21:19:21 CEST 2026
On 2026-03-31T08:01:10, Ilias Apalodimas <ilias.apalodimas at linaro.org> wrote:
> fdtdec: Deduplicate iterator function
>
> Both fdtdec_setup_memory_banksize() and fdtdec_setup_mem_size_base_lowest()
> implement the exact same iterator over all memory banks, the only difference
> is the body that is executed for each bank. Deduplicate the functionality
> into iterator function fdtdec_setup_mem_for_each_bank(), which takes a
> function pointer to a function which implements the body as a parameter.
> No functional change.
>
> Reviewed-by: Ilias Apalodimas <ilias.apalodimas at linaro.org>
> Signed-off-by: Ilias Apalodimas <ilias.apalodimas at linaro.org>
> Signed-off-by: Marek Vasut <marek.vasut+renesas at mailbox.org>
> Reviewed-by: Anshul Dalal <anshuld at ti.com>
>
> lib/fdtdec.c | 77 +++++++++++++++++++++++-------------------------------------
> 1 file changed, 30 insertions(+), 47 deletions(-)
Reviewed-by: Simon Glass <sjg at chromium.org>
More information about the U-Boot
mailing list