[PATCH 3/5] efi_selftest: remove unnecessary initializations
Vincent Stehlé
vincent.stehle at arm.com
Thu Feb 19 19:43:58 CET 2026
The UEFI function LocateHandleBuffer() always writes to the value pointed
to by its NoHandles argument (in the test, `count'); remove the unnecessary
initializations.
Remove also one copy to buffer_size, which has become unnecessary.
Signed-off-by: Vincent Stehlé <vincent.stehle at arm.com>
Cc: Heinrich Schuchardt <xypron.glpk at gmx.de>
Cc: Ilias Apalodimas <ilias.apalodimas at linaro.org>
Cc: Tom Rini <trini at konsulko.com>
---
lib/efi_selftest/efi_selftest_manageprotocols.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/lib/efi_selftest/efi_selftest_manageprotocols.c b/lib/efi_selftest/efi_selftest_manageprotocols.c
index 0334a074866..7fe7b285011 100644
--- a/lib/efi_selftest/efi_selftest_manageprotocols.c
+++ b/lib/efi_selftest/efi_selftest_manageprotocols.c
@@ -219,7 +219,6 @@ static int execute(void)
*
* handle1, handle2
*/
- count = buffer_size;
ret = boottime->locate_handle_buffer(BY_PROTOCOL, &guid1, NULL,
&count, &buffer);
if (ret != EFI_SUCCESS) {
@@ -257,7 +256,6 @@ static int execute(void)
efi_st_error("LocateHandle failed to locate new handles\n");
return EFI_ST_FAILURE;
}
- buffer_size = count;
ret = find_in_buffer(handle1, count, buffer);
if (ret != EFI_SUCCESS) {
efi_st_error("LocateHandle failed to locate new handles\n");
@@ -303,7 +301,6 @@ static int execute(void)
/*
* Check that the protocols are really uninstalled.
*/
- count = buffer_size;
ret = boottime->locate_handle_buffer(BY_PROTOCOL, &guid1, NULL,
&count, &buffer);
if (ret != EFI_SUCCESS) {
--
2.51.0
More information about the U-Boot
mailing list