From: "Ilias Apalodimas" <ilias.apalodimas@linaro.org>
To: "Vincent Stehlé" <vincent.stehle@arm.com>, u-boot@lists.denx.de
Cc: "Heinrich Schuchardt" <xypron.glpk@gmx.de>,
"Ilias Apalodimas" <ilias.apalodimas@linaro.org>,
"Tom Rini" <trini@konsulko.com>
Subject: Re: [PATCH 3/5] efi_selftest: remove unnecessary initializations
Date: Fri, 20 Feb 2026 09:43:16 +0200 [thread overview]
Message-ID: <DGJMCUYMMMGA.2LW9CCQPBKT2N@linaro.org> (raw)
In-Reply-To: <20260219184400.257008-4-vincent.stehle@arm.com>
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@arm.com>
> Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
> Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>
> Cc: Tom Rini <trini@konsulko.com>
> ---
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@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) {
next prev parent reply other threads:[~2026-02-20 7:43 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-19 18:43 [PATCH 0/5] efi_selftest: manageprotocols fixes and enhancements Vincent Stehlé
2026-02-19 18:43 ` [PATCH 1/5] efi_selftest: fix buffer overflow Vincent Stehlé
2026-02-20 7:37 ` Ilias Apalodimas
2026-02-24 15:45 ` Heinrich Schuchardt
2026-03-10 17:16 ` Vincent Stehlé
2026-02-19 18:43 ` [PATCH 2/5] efi_selftest: fix buffer overflow and memory leak Vincent Stehlé
2026-02-20 9:10 ` Ilias Apalodimas
2026-02-19 18:43 ` [PATCH 3/5] efi_selftest: remove unnecessary initializations Vincent Stehlé
2026-02-20 7:43 ` Ilias Apalodimas [this message]
2026-02-19 18:43 ` [PATCH 4/5] efi_selftest: fix buffer size and count computations Vincent Stehlé
2026-02-20 9:13 ` Ilias Apalodimas
2026-02-19 18:44 ` [PATCH 5/5] efi_selftest: cosmetic: fix spelling in comments Vincent Stehlé
2026-02-20 7:42 ` Ilias Apalodimas
2026-02-24 15:55 ` Heinrich Schuchardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DGJMCUYMMMGA.2LW9CCQPBKT2N@linaro.org \
--to=ilias.apalodimas@linaro.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=vincent.stehle@arm.com \
--cc=xypron.glpk@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox