]> www.infradead.org Git - users/jedix/linux-maple.git/commit
efi/libstub: Use C99-style for loop to traverse handle buffer
authorArd Biesheuvel <ardb@kernel.org>
Thu, 19 Dec 2024 09:53:23 +0000 (10:53 +0100)
committerArd Biesheuvel <ardb@kernel.org>
Tue, 14 Jan 2025 07:34:25 +0000 (08:34 +0100)
commitc14bca3f7aa94fd8d3f5e621ce5b56535ef2396b
treecb9f0d9d43dad5727bbc521770bb0ef54517da37
parent144d52dd8fc83a082a275e1b663e7454d2b616a4
efi/libstub: Use C99-style for loop to traverse handle buffer

Tweak the for_each_efi_handle() macro in order to avoid the need on the
part of the caller to provide a loop counter variable.

Also move efi_get_handle_num() to the callers, so that each occurrence
can be replaced with the actual number returned by the simplified
LocateHandleBuffer API.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
drivers/firmware/efi/libstub/efistub.h
drivers/firmware/efi/libstub/gop.c
drivers/firmware/efi/libstub/pci.c
drivers/firmware/efi/libstub/x86-stub.c