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 19116C761A6 for ; Tue, 4 Apr 2023 07:35:44 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 016CB85A1A; Tue, 4 Apr 2023 09:35:40 +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="miRix2Qj"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4C638859F2; Tue, 4 Apr 2023 09:35:38 +0200 (CEST) Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) (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 E5AAF85BFB for ; Tue, 4 Apr 2023 09:35:34 +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-x535.google.com with SMTP id cn12so126834276edb.4 for ; Tue, 04 Apr 2023 00:35:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680593734; 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=j9+kgQuQqqwCNdDb38vFmdeonHuSkvPB2f6vu6i0nw4=; b=miRix2QjJkKNRE3gl/SEE8RKNlz7uMauI6ot45OXyYv45PgVj+nHzvrVwnYOWOB6Z+ hl88OTJpnOm2iYComEeIakDM8qk5uh9B8sSjFm+GlocxE6XDDKFzOLPmorm0OIw/lolO HZxGtNBuYW1jD3dLJ8cfkMsHJimZdWS1XYcbyCKxcOizYkEzpeXjo0jumQJKvFzst708 46nW2M047lvCyAfxJDn5MEJmX/cgjsxDNFncZEMmXRfsTC1Yg7kbiGDV1DcUPjtT8/99 XxyBduOH7elzHos+hq2xN/ARcwDWaIc9uAF2i95HoZiJmSAi+8UJYLPPee4d4szR8fbr fgQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680593734; 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=j9+kgQuQqqwCNdDb38vFmdeonHuSkvPB2f6vu6i0nw4=; b=Oj/Ss6aZMPzdHrIEiZclIrS7tnBSF4c+M2z9QNdD49PJ0YjVCgPB+zusX+g5rXyqZf iTDVYNeV/xENVzQWUuLAdmGX5a+qNUOgibWXJUyPa8ejrGeDkwQZhoigr7qvz9zmx1Xt 6KS9xC0R7EQyaX1v8P54OKqb+RO/xV2PwggGrlFFJa3ixDLktRvxIUj4yIEalXHuUTK/ BAQew5sNzTllg3k6F5gFx2Lx8fF/9OemvfpLtm08Vy7BtipmR4ceQ7yi8+eWj8PE5iMl T+ppVvtVc8sFR8NlcpJmqSCGmpcoxpIZi4VLc2FnjUYZYntdrzim/7UU2LMeQeJ9sHNr TTXQ== X-Gm-Message-State: AAQBX9eiRqiXSGhtBaT7Ktfhakzo6+Ime+HoLZ0jgmwcIMIbeWSR7k+z C/9lOVvRGjZgzUaff5vZHymWLQ== X-Google-Smtp-Source: AKy350bhMVfGMWW6JiN5oBKAL0KqW4Ncg/e2/L8oIwzVpJWMv2RS6GA+Be63a/6DL0zYiNaCmOAueA== X-Received: by 2002:a17:907:2071:b0:921:5e7b:1c27 with SMTP id qp17-20020a170907207100b009215e7b1c27mr1527461ejb.24.1680593734393; Tue, 04 Apr 2023 00:35:34 -0700 (PDT) Received: from hera (ppp176092130041.access.hol.gr. [176.92.130.41]) by smtp.gmail.com with ESMTPSA id u19-20020a17090657d300b00905a1abecbfsm5547823ejr.47.2023.04.04.00.35.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Apr 2023 00:35:34 -0700 (PDT) Date: Tue, 4 Apr 2023 10:35:31 +0300 From: Ilias Apalodimas To: Heinrich Schuchardt Cc: u-boot@lists.denx.de Subject: Re: [PATCH 1/1] efi_loader: avoid using HandleProtocol in helloworld.efi Message-ID: References: <20230404051748.23889-1-heinrich.schuchardt@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230404051748.23889-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 On Tue, Apr 04, 2023 at 07:17:48AM +0200, Heinrich Schuchardt wrote: > HandleProtocol() is deprecated and leaves an OpenedProtocolInformation > behind. Use OpenProtocol(GET_PROTOCOL) instead. > > Signed-off-by: Heinrich Schuchardt > --- > lib/efi_loader/helloworld.c | 13 ++++++++----- > 1 file changed, 8 insertions(+), 5 deletions(-) > > diff --git a/lib/efi_loader/helloworld.c b/lib/efi_loader/helloworld.c > index 49fa8cc2f0..6405f58ec3 100644 > --- a/lib/efi_loader/helloworld.c > +++ b/lib/efi_loader/helloworld.c > @@ -197,8 +197,10 @@ efi_status_t EFIAPI efi_main(efi_handle_t handle, > print_config_tables(); > > /* Get the loaded image protocol */ > - ret = boottime->handle_protocol(handle, &loaded_image_guid, > - (void **)&loaded_image); > + ret = boottime->open_protocol(handle, &loaded_image_guid, > + (void **)&loaded_image, NULL, NULL, > + EFI_OPEN_PROTOCOL_GET_PROTOCOL); > + > if (ret != EFI_SUCCESS) { > con_out->output_string > (con_out, u"Cannot open loaded image protocol\r\n"); > @@ -219,9 +221,10 @@ efi_status_t EFIAPI efi_main(efi_handle_t handle, > (con_out, u"Missing device handle\r\n"); > goto out; > } > - ret = boottime->handle_protocol(loaded_image->device_handle, > - &device_path_guid, > - (void **)&device_path); > + ret = boottime->open_protocol(loaded_image->device_handle, > + &device_path_guid, > + (void **)&device_path, NULL, NULL, > + EFI_OPEN_PROTOCOL_GET_PROTOCOL); > if (ret != EFI_SUCCESS) { > con_out->output_string > (con_out, u"Missing device path for device handle\r\n"); > -- > 2.39.2 > Reviewed-by: Ilias Apalodimas