From patchwork Tue Jul 11 20:06:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinrich Schuchardt X-Patchwork-Id: 786835 X-Patchwork-Delegate: agraf@suse.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3x6Y7G5rhKz9s0Z for ; Wed, 12 Jul 2017 06:08:42 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 8A2A6C21E89; Tue, 11 Jul 2017 20:07:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 0C363C21E4C; Tue, 11 Jul 2017 20:07:27 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id C0483C21C73; Tue, 11 Jul 2017 20:07:24 +0000 (UTC) Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) by lists.denx.de (Postfix) with ESMTPS id 6A120C21CC4 for ; Tue, 11 Jul 2017 20:07:24 +0000 (UTC) Received: from workstation4.fritz.box ([88.152.145.149]) by mail.gmx.com (mrgmx001 [212.227.17.184]) with ESMTPSA (Nemesis) id 0Le64S-1e11jm0xaO-00pxmg; Tue, 11 Jul 2017 22:06:38 +0200 From: Heinrich Schuchardt To: Alexander Graf Date: Tue, 11 Jul 2017 22:06:19 +0200 Message-Id: <20170711200625.7108-7-xypron.glpk@gmx.de> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170711200625.7108-1-xypron.glpk@gmx.de> References: <20170711200625.7108-1-xypron.glpk@gmx.de> X-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fu7W9e5RSRCpE= Cc: Heinrich Schuchardt , u-boot@lists.denx.de Subject: [U-Boot] [PATCH v2 06/12] efi_loader: refactor efi_uninstall_protocol_interface X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" For the implementation of UninstallMultipleProtocolInterfaces we need to call efi_uninstall_protocol_interface. In internal calls we should not pass through EFI_EXIT. The patch introduces a wrapper function efi_uninstall_protocol_interface_ext. Signed-off-by: Heinrich Schuchardt --- v2 no change --- lib/efi_loader/efi_boottime.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index 0075ccaaa2..607287d01f 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -382,8 +382,6 @@ static efi_status_t EFIAPI efi_uninstall_protocol_interface(void *handle, int i; efi_status_t r = EFI_NOT_FOUND; - EFI_ENTRY("%p, %p, %p", handle, protocol, protocol_interface); - if (!handle || !protocol) { r = EFI_INVALID_PARAMETER; goto out; @@ -412,7 +410,16 @@ static efi_status_t EFIAPI efi_uninstall_protocol_interface(void *handle, } out: - return EFI_EXIT(r); + return r; +} + +static efi_status_t EFIAPI efi_uninstall_protocol_interface_ext(void *handle, + efi_guid_t *protocol, void *protocol_interface) +{ + EFI_ENTRY("%p, %p, %p", handle, protocol, protocol_interface); + + return EFI_EXIT(efi_uninstall_protocol_interface(handle, protocol, + protocol_interface)); } static efi_status_t EFIAPI efi_register_protocol_notify(efi_guid_t *protocol, @@ -900,7 +907,7 @@ static const struct efi_boot_services efi_boot_services = { .check_event = efi_check_event, .install_protocol_interface = efi_install_protocol_interface_ext, .reinstall_protocol_interface = efi_reinstall_protocol_interface, - .uninstall_protocol_interface = efi_uninstall_protocol_interface, + .uninstall_protocol_interface = efi_uninstall_protocol_interface_ext, .handle_protocol = efi_handle_protocol, .reserved = NULL, .register_protocol_notify = efi_register_protocol_notify,