]> git.ipfire.org Git - thirdparty/u-boot.git/commit
efi_mem_sort: use list_for_each_entry_safe instead
authorRandolph Sapp <rs@ti.com>
Wed, 22 Apr 2026 17:09:45 +0000 (12:09 -0500)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Tue, 5 May 2026 14:29:08 +0000 (16:29 +0200)
commitb1c28ad5fafd95c183b26165e498354db41b755b
treec2b9f4707e71e253aa84f2aadf4b0fc0ccedcadd
parent025c4cbd422ccc591595dc321277234fdeb3a967
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@ti.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
lib/efi_loader/efi_memory.c