public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Ilias Apalodimas <ilias.apalodimas@linaro.org>
To: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>, g@hades
Cc: u-boot@lists.denx.de
Subject: Re: [PATCH v2 1/1] efi_loader: simplify efi_uninstall_protocol()
Date: Sun, 18 Jun 2023 17:02:38 +0300	[thread overview]
Message-ID: <ZI8OfrS8d9QPfkmV@hades> (raw)
In-Reply-To: <20230618102547.27899-1-heinrich.schuchardt@canonical.com>

Hi Heinrich 

On Sun, Jun 18, 2023 at 12:25:47PM +0200, Heinrich Schuchardt wrote:
> The call to efi_search_obj() is redundant as the function is called in
> efi_search_protocol() too.
> 
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> ---
> v2:
> 	Use handle instead of efiobj to invoke efi_disconnect_all_drivers()
> ---
>  lib/efi_loader/efi_boottime.c | 9 +--------
>  1 file changed, 1 insertion(+), 8 deletions(-)
> 
> diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
> index d5065f296a..00f1dd0f56 100644
> --- a/lib/efi_loader/efi_boottime.c
> +++ b/lib/efi_loader/efi_boottime.c
> @@ -1336,24 +1336,17 @@ static efi_status_t efi_uninstall_protocol
>  			(efi_handle_t handle, const efi_guid_t *protocol,
>  			 void *protocol_interface)
>  {
> -	struct efi_object *efiobj;
>  	struct efi_handler *handler;
>  	struct efi_open_protocol_info_item *item;
>  	struct efi_open_protocol_info_item *pos;
>  	efi_status_t r;
>  
> -	/* Check handle */
> -	efiobj = efi_search_obj(handle);
> -	if (!efiobj) {
> -		r = EFI_INVALID_PARAMETER;
> -		goto out;
> -	}
>  	/* Find the protocol on the handle */
>  	r = efi_search_protocol(handle, protocol, &handler);
>  	if (r != EFI_SUCCESS)
>  		goto out;
>  	/* Disconnect controllers */
> -	efi_disconnect_all_drivers(efiobj, protocol, NULL);
> +	efi_disconnect_all_drivers(handle, protocol, NULL);

Mind dropping this one ?
I've already sent a fix for this here[0].

You can add my reviewed-by on v1 instead

[0] https://lore.kernel.org/u-boot/20230615143941.416924-3-ilias.apalodimas@linaro.org/

Thanks
/Ilias

>  	/* Close protocol */
>  	list_for_each_entry_safe(item, pos, &handler->open_infos, link) {
>  		if (item->info.attributes ==
> -- 
> 2.40.1
> 

  reply	other threads:[~2023-06-18 14:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-18 10:25 [PATCH v2 1/1] efi_loader: simplify efi_uninstall_protocol() Heinrich Schuchardt
2023-06-18 14:02 ` Ilias Apalodimas [this message]
2023-06-19  7:51   ` Ilias Apalodimas

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=ZI8OfrS8d9QPfkmV@hades \
    --to=ilias.apalodimas@linaro.org \
    --cc=g@hades \
    --cc=heinrich.schuchardt@canonical.com \
    --cc=u-boot@lists.denx.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