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 4BA24C433F5 for ; Mon, 10 Oct 2022 08:01:09 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DE64084E1F; Mon, 10 Oct 2022 10:01:03 +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="prP6ImrG"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BFBD584E30; Mon, 10 Oct 2022 10:00:50 +0200 (CEST) Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) (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 482E484E1D for ; Mon, 10 Oct 2022 10:00:39 +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-ed1-x52c.google.com with SMTP id u21so14755265edi.9 for ; Mon, 10 Oct 2022 01:00:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=My+pUfCOOKD+VDte08KuhVwrbaoXLhuorA98LkU9u2A=; b=prP6ImrG64sNIjzp/RQgEuyJyC3tM2VB/fNxdVIRdOR0qKFGebDRma35cObJ0ZsR0y JhNYiB6B78e/RLaAdclZM9hsQLuC6K9GomUTYR6oWKyWkLRPioIYLuN6QXXsTLvwNEq3 HYbXM6f1WSPTS4D9m94NUeRy5WJSYCNGr18YogNf3qPN29BcW7ZNJEHaqKIa2iDHWsLO pLL6DXrintqY+8n7my1CLHHDiJuFYahVHePguEf/nMCN34SDbQYa9B8JTQ1UVkucwq1X BQPJpeEnsOVm1adPhFbZUUbxa4eyFp457+TIFOxkur5JFKAlBWNGvW22CRJkyZbXDwMX drnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=My+pUfCOOKD+VDte08KuhVwrbaoXLhuorA98LkU9u2A=; b=BLUySSzYofHNlgJ97REc1WRNH6nhWQmWu3eulvdmGaTiUYcXI35X9WNO0jGH4rq7bp tTZgp6ZkASppkfUX9uBDYZrJ/M/Ieblbleep26CyPuM4cdwZ+p0z1jGJXNw3+CA5Yi4s +EEOTKlY+FmfE/palFfn3uHODOtzRIFugWaB63vSC4Q9CNDYD3lThRBI5Ionoupz15FA rk9UndhlluNh6jlxApe+qc0H4sLbNwW2BItj8SAIXos4ph6g8AqAUmx1nCp0Y3spwkP5 WJJE0elQJGOekB2Y1pe+Aq4ab3IFcDOazDRyAqsKW9HXMgpBNbYCtLCV6N89IHGA1sod RxvA== X-Gm-Message-State: ACrzQf0E6eIzSSS5ZgBkNA6E+6eDKf0PTzSUJj8ihdqR86/jDXSNuprg 6PfvKnc1B7F3N0xhOVBcrkE8YyyjcnVWtQ== X-Google-Smtp-Source: AMsMyM5cPIq+dfArFaX13CfRYAsnMpyaGYX5SSXtiVHXCwlSM8D+egYFuIITFIJpxhK8QOHH2rA/Zw== X-Received: by 2002:a05:6402:7d0:b0:459:d35c:8563 with SMTP id u16-20020a05640207d000b00459d35c8563mr17181319edy.229.1665388838877; Mon, 10 Oct 2022 01:00:38 -0700 (PDT) Received: from hades (ppp046103015185.access.hol.gr. [46.103.15.185]) by smtp.gmail.com with ESMTPSA id mf22-20020a1709071a5600b0074136cac2e7sm4946497ejc.81.2022.10.10.01.00.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Oct 2022 01:00:38 -0700 (PDT) Date: Mon, 10 Oct 2022 11:00:36 +0300 From: Ilias Apalodimas To: Heinrich Schuchardt Cc: u-boot@lists.denx.de Subject: Re: [PATCH 2/2] efi_driver: use efi_close_protocol Message-ID: References: <20221008071442.5963-1-heinrich.schuchardt@canonical.com> <20221008071442.5963-3-heinrich.schuchardt@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221008071442.5963-3-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.6 at phobos.denx.de X-Virus-Status: Clean On Sat, Oct 08, 2022 at 09:14:42AM +0200, Heinrich Schuchardt wrote: > Avoid EFI_CALL() by using efi_close_protocol(). > > Signed-off-by: Heinrich Schuchardt > --- > lib/efi_driver/efi_uclass.c | 25 +++++++++++-------------- > 1 file changed, 11 insertions(+), 14 deletions(-) > > diff --git a/lib/efi_driver/efi_uclass.c b/lib/efi_driver/efi_uclass.c > index 45610d1aa3..45f9351988 100644 > --- a/lib/efi_driver/efi_uclass.c > +++ b/lib/efi_driver/efi_uclass.c > @@ -97,10 +97,9 @@ static efi_status_t EFIAPI efi_uc_supported( > > ret = check_node_type(controller_handle); > > - r = EFI_CALL(systab.boottime->close_protocol( > - controller_handle, bp->ops->protocol, > - this->driver_binding_handle, > - controller_handle)); > + r = efi_close_protocol(controller_handle, bp->ops->protocol, > + this->driver_binding_handle, > + controller_handle); > if (r != EFI_SUCCESS) > ret = EFI_UNSUPPORTED; > out: > @@ -151,10 +150,9 @@ static efi_status_t EFIAPI efi_uc_start( > goto out; > > err: > - r = EFI_CALL(systab.boottime->close_protocol( > - controller_handle, bp->ops->protocol, > - this->driver_binding_handle, > - controller_handle)); > + r = efi_close_protocol(controller_handle, bp->ops->protocol, > + this->driver_binding_handle, > + controller_handle); > if (r != EFI_SUCCESS) > EFI_PRINT("Failure to close handle\n"); > > @@ -177,9 +175,8 @@ static efi_status_t disconnect_child(efi_handle_t controller_handle, > efi_guid_t *guid_controller = NULL; > efi_guid_t *guid_child_controller = NULL; > > - ret = EFI_CALL(systab.boottime->close_protocol( > - controller_handle, guid_controller, > - child_handle, child_handle)); > + ret = efi_close_protocol(controller_handle, guid_controller, > + child_handle, child_handle); > if (ret != EFI_SUCCESS) { > EFI_PRINT("Cannot close protocol\n"); > return ret; > @@ -252,9 +249,9 @@ static efi_status_t EFIAPI efi_uc_stop( > log_err("Cannot free EFI memory pool\n"); > > /* Detach driver from controller */ > - ret = EFI_CALL(systab.boottime->close_protocol( > - controller_handle, bp->ops->protocol, > - this->driver_binding_handle, controller_handle)); > + ret = efi_close_protocol(controller_handle, bp->ops->protocol, > + this->driver_binding_handle, > + controller_handle); > out: > return EFI_EXIT(ret); > } > -- > 2.37.2 > Reviewed-by: Ilias Apalodimas