From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7152DEB64D8 for ; Sun, 18 Jun 2023 14:02:50 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D46CD8474B; Sun, 18 Jun 2023 16:02:47 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="Fh2718ta"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6D1DD861A9; Sun, 18 Jun 2023 16:02:45 +0200 (CEST) Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 2FCD4801AF for ; Sun, 18 Jun 2023 16:02:42 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ilias.apalodimas@linaro.org Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-30e3caa6aa7so2365597f8f.1 for ; Sun, 18 Jun 2023 07:02:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687096961; x=1689688961; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=YYCVACrzvYVS82SWq1RdUi+iIdAikURxM9M3vAOygy8=; b=Fh2718ta2+kRi1a7iE9nsZsh5HSdoLY3ZmdRnlzfCriURCjCYfcq/EOsWjqgCmoenO fwJ98CjHb4R2OlDb467vVaOD7DYQndU31DPC2Gv277gUMrUDisLrsxt+eHVRPP/QhCqG 9Z8V09HIbAruebjsEmXuZUv5C1eM85WLFiElzcg0qypzUBP0WzKApN17YnNQwrGExgJV PzZKmRMR7lBdXWiOIsJFSOAWcA0+CtvbdRd/HCHLWLO2Q8p/5HTD0RPmOdZeN/OdjLqy t+DAKR07NMzzMe3H40I22L+mgDpIGcJdXr1A7hvRyg6AkjY7q2bAqCxd2J0rBXZkedJj j8Gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687096961; x=1689688961; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=YYCVACrzvYVS82SWq1RdUi+iIdAikURxM9M3vAOygy8=; b=eDO+DANaoJkC6LsR0cTYdm8olmeNlK2xbErqdG5HZaDC6tbnZeTpiWFAJg71b/EWVY jOt2tw3ORv3YZwaR9Sx5cawdl3reNW+PmxRmW9Z1NSza7r8y58EsBF74OuT2HhihB7nU blQeVC21PDPwrRZpPUiZPsobBHVJL57pa97et4j6BWiAvjErTiwMxmuHOljF8AV6yLI9 xsD6aAuh98Fz4uPuzKf0vvAzpv8dE8nB56lKzrslV7T7HjBBAmDdUmU7Msn8e2j8Nuvh MCFAup+KhwU52HmMjr4PJHjAFD6isRyYJkY1SMPq+f1JXTObKCxVF2vN1EBxO5mYeauJ jjZg== X-Gm-Message-State: AC+VfDynfZgeOsxXwdcFLV5Pf8FPinwfM4gJnKUbMz/KsUWkoTglKG62 buFlF0bp80mhnivYXfFQduyyxg== X-Google-Smtp-Source: ACHHUZ7cJ+4PvRhsYe/XQH3GNQA4zTpi66+0wZSH/ztYRRxO0XIGv/xaZhP5A11uZu7UZQA+TuK0TQ== X-Received: by 2002:adf:e403:0:b0:306:4273:9efc with SMTP id g3-20020adfe403000000b0030642739efcmr5545144wrm.40.1687096961453; Sun, 18 Jun 2023 07:02:41 -0700 (PDT) Received: from hades (ppp089210114029.access.hol.gr. [89.210.114.29]) by smtp.gmail.com with ESMTPSA id d6-20020adffd86000000b0030ae87bd3e3sm28817876wrr.18.2023.06.18.07.02.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Jun 2023 07:02:41 -0700 (PDT) Date: Sun, 18 Jun 2023 17:02:38 +0300 From: Ilias Apalodimas To: Heinrich Schuchardt , g@hades Cc: u-boot@lists.denx.de Subject: Re: [PATCH v2 1/1] efi_loader: simplify efi_uninstall_protocol() Message-ID: References: <20230618102547.27899-1-heinrich.schuchardt@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230618102547.27899-1-heinrich.schuchardt@canonical.com> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean 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 > --- > 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 >