From patchwork Mon Jun 19 11:14:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilias Apalodimas X-Patchwork-Id: 694010 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d91:0:0:0:0:0 with SMTP id b17csp2316257wru; Mon, 19 Jun 2023 04:14:41 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7kG6LiGUkhyvftmgZEf3dtMHplVsXD9GJsz1LdKrvLcKG4xh8D+wPgdHuCmT4mGNqMrLNI X-Received: by 2002:a05:6808:21a8:b0:39a:bda7:adc1 with SMTP id be40-20020a05680821a800b0039abda7adc1mr738008oib.2.1687173281111; Mon, 19 Jun 2023 04:14:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687173281; cv=none; d=google.com; s=arc-20160816; b=iXtdKIdlRlzc0FcYBj1u3FNLsFrzQm5J9sAaH63G+VzfhEHTfp8ZtBbdSJG+Pzx3mf ymYcqIxX023QaFHAf9TlvEBB32ZLb/aHUFBgIeso+Frqj3fLAk7pORMuk2eJU9yzPIiu VHLdAQyM8BxGWO6Id6Ttl5eBLZegwncqLEn9We7/yG648oVp8EXS+VYat6KCz6qT7T6v 1nrzGz8MxxiKK/70XIZ71svsfQL1vFw2jIHu5JyVoMEkq5bUtgGC/7r6CuGC3xEeKdg+ xia8Rx8dzubaQanmoshXnh1oNLuouWJWIi2XG0I1+Quasc+kYQwJVyAhkQFKotXHMfCg BBDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=cWT/bTdC5tpAPzQV6uFmitlMPHdGwVRs6c8CkZfgSlM=; b=MmNT4LznJYFuVFP+3FlboxoSA+wkfDekTnv4IdnXdf7BaHw2YRPB02+DdTUFCwymx7 +h8EJD9PMCSYRryieKluA+zyXFMdDvltZjj8jWW9L888EYhSuu/S9WhHXPFDK+bbnhwz 6EHOgfskHuvUq/X0r4QgiUpEJQ87gozdvG9ZRL+5A0Ls+pLVCp1Oy0xmb+GF4rawWk8t UUPcHjDkbV/B34pciX7/LEGKVcVaFHzlKd4nWM6Sb5VwEk9CEiqPyQkfYGdKal5VYRRh +zvKRYwU9tLIv1BAHEfobHhy/M2pOvtIbrH6ag1rLCh3ubSOo74jcTqBRBFAe1799HVI XVMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=F+TEk8eX; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id e35-20020a17090a6fa600b0025be5f3c52fsi7297044pjk.38.2023.06.19.04.14.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Jun 2023 04:14:41 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=F+TEk8eX; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E05BD85D7C; Mon, 19 Jun 2023 13:14:35 +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="F+TEk8eX"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 154DF84796; Mon, 19 Jun 2023 13:14:32 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) (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 E1A71856A7 for ; Mon, 19 Jun 2023 13:14:08 +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-x42b.google.com with SMTP id ffacd0b85a97d-31114b46d62so3385049f8f.3 for ; Mon, 19 Jun 2023 04:14:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687173248; x=1689765248; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=cWT/bTdC5tpAPzQV6uFmitlMPHdGwVRs6c8CkZfgSlM=; b=F+TEk8eXMedlB5GVijGbrYLjit0PzJh8EqUbiDBq3WBFyQYwNcrPHEUxu5Hzaa4Ub9 u0pA4ZbIeNWGpiKptgqwRRNOHoRIIl6fgkBPtwLhS1i9YANYibwA7ykSfvJ0S5r/AIad nxoJ4nKjFO7Toy9Ou323CeW6cFiQD8a2L4ANTeqlFtvO8Yso2MlyGmTOPfzt/3onDl1S 9UVE+J2aEpVJUN0aqvCUgxGLakm6YsLNYI0wPEyMwRsH8wdnMOByEkcwFezcze8Mjr3w p9hm0SRgfcRKf9wpGQ31w1yJ9PbFbWDKKeargBmjV8rX+Z03CzSan/FLT2rwNSjr8mYE qYcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687173248; x=1689765248; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cWT/bTdC5tpAPzQV6uFmitlMPHdGwVRs6c8CkZfgSlM=; b=SXp2pFr+MxNW7vDUMqnq3J97egIkuRQKs794pRdGtWViUI/YtmbvINvOZ9h5nQll+U Fu0hVmIpfNQrC8C61qU+TPoaxYmXzXHpru1Ec17w98eO4iX6JVOPolUKPcI/GGnCJorO ePzFheHEn4uQpUVdk8IvccmTV0pprA8hmpNtvPBzdL8NQuDEoHksvZd0ucn8MdQxGd9I K2Jz6h9E4ZZiUETJBCcotQZvajIGaYlxU0RMsIM6le7BRN3VjkkQEBucHdJ9/7H2DPSH +Q3oBXdZYhAGpyNB0zKP7rkNsykXjQ9HBezXf6d1eWjigRFGnzTR9Z5k6gOQgM298RL7 eWcw== X-Gm-Message-State: AC+VfDxzjk8gXAVlftO6Hs+0jcj9UHarwejbiaKXeeNzZ55Fzj8bj+JM TGvBp8kT2jwo/Dm9fscK83tN0LGcjCBHGie4LBMD1w== X-Received: by 2002:a5d:628d:0:b0:30f:c129:63b5 with SMTP id k13-20020a5d628d000000b0030fc12963b5mr9629120wru.47.1687173248391; Mon, 19 Jun 2023 04:14:08 -0700 (PDT) Received: from localhost.localdomain (ppp089210114029.access.hol.gr. [89.210.114.29]) by smtp.gmail.com with ESMTPSA id y5-20020a056000108500b00311339f5b06sm5129727wrw.57.2023.06.19.04.14.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Jun 2023 04:14:08 -0700 (PDT) From: Ilias Apalodimas To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Heinrich Schuchardt Subject: [PATCH 2/2 v2] efi_loader: make efi_remove_protocol() static Date: Mon, 19 Jun 2023 14:14:03 +0300 Message-Id: <20230619111403.51126-2-ilias.apalodimas@linaro.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230619111403.51126-1-ilias.apalodimas@linaro.org> References: <20230619111403.51126-1-ilias.apalodimas@linaro.org> MIME-Version: 1.0 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 A previous patch is removing the last consumer of efi_remove_protocol(). Switch that to static and treat it as an internal API in order to force users install and remove protocols with the appropriate EFI functions. It's worth noting that we still have files using efi_add_protocol(). We should convert all these to efi_install_multiple_protocol_interfaces() and treat efi_add_protocol() in a similar manner Reviewed-by: Heinrich Schuchardt Signed-off-by: Ilias Apalodimas --- Changes since v2: - Add r-b tags include/efi_loader.h | 4 ---- lib/efi_loader/efi_boottime.c | 6 +++--- 2 files changed, 3 insertions(+), 7 deletions(-) -- 2.40.1 diff --git a/include/efi_loader.h b/include/efi_loader.h index 11e08a804f7f..90a2f72d6929 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -651,10 +651,6 @@ efi_status_t efi_protocol_open(struct efi_handler *handler, void **protocol_interface, void *agent_handle, void *controller_handle, uint32_t attributes); -/* Delete protocol from a handle */ -efi_status_t efi_remove_protocol(const efi_handle_t handle, - const efi_guid_t *protocol, - void *protocol_interface); /* Install multiple protocol interfaces */ efi_status_t EFIAPI efi_install_multiple_protocol_interfaces(efi_handle_t *handle, ...); diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index d5065f296aee..5006c0e1e4af 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -569,9 +569,9 @@ efi_status_t efi_search_protocol(const efi_handle_t handle, * * Return: status code */ -efi_status_t efi_remove_protocol(const efi_handle_t handle, - const efi_guid_t *protocol, - void *protocol_interface) +static efi_status_t efi_remove_protocol(const efi_handle_t handle, + const efi_guid_t *protocol, + void *protocol_interface) { struct efi_handler *handler; efi_status_t ret;