[PATCHv3 5/6] efi_mem_sort: use list_for_each_entry_safe instead
Simon Glass
sjg at chromium.org
Sun Apr 19 05:52:36 CEST 2026
On 2026-04-13T20:35:52, Randolph Sapp <rs at ti.com> wrote:
> efi_mem_sort: use list_for_each_entry_safe instead
>
> Use list_for_each_entry_safe and comparisons against the current and
> next efi_mem_desc. This reduces the computation required for merging
> regions, prevents unnecessary additional iterations of the list, and
> requires less temporary values.
>
> Signed-off-by: Randolph Sapp <rs at ti.com>
> Reviewed-by: Ilias Apalodimas <ilias.apalodimas at linaro.org>
>
> lib/efi_loader/efi_memory.c | 48 ++++++++++++++++-----------------------------
> 1 file changed, 17 insertions(+), 31 deletions(-)
Reviewed-by: Simon Glass <sjg at chromium.org>
More information about the U-Boot
mailing list