[PATCH 3/5] efi_selftest: remove unnecessary initializations
Ilias Apalodimas
ilias.apalodimas at linaro.org
Fri Feb 20 08:43:16 CET 2026
On Thu Feb 19, 2026 at 8:43 PM EET, Vincent Stehlé wrote:
> 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>
> ---
Reviewed-by: Ilias Apalodimas <ilias.apalodimas at linaro.org>
> 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) {
More information about the U-Boot
mailing list