From patchwork Thu Jun 15 06:57:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilias Apalodimas X-Patchwork-Id: 693002 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d91:0:0:0:0:0 with SMTP id b17csp375262wru; Wed, 14 Jun 2023 23:58:08 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ60JRlN4CN+tIkLQ/1HrD283na8mxzOFMbIXXcBA1aA5F4VpeljhPBLnT5Udhz4gaKAJBD4 X-Received: by 2002:a17:902:d4d1:b0:1ab:29bc:bd87 with SMTP id o17-20020a170902d4d100b001ab29bcbd87mr15317173plg.35.1686812288422; Wed, 14 Jun 2023 23:58:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686812288; cv=none; d=google.com; s=arc-20160816; b=BMxdSACZ7YIiDOPjvit4he9FBf/qp5WqeuJtVWU7sZ4ru6vi8EyFWOgPM6Ux3ZGJfJ Gqh7hiucSEP34zA0OB/CtLlV1Z52u/TBAib585sgRnZYnlAWvhdCyte9wrJxz8kFYL0c 1IhMzOpC8+5SapzJ6BFuODevC/kZPrAxBhG5WOZSa9PS+tbu2egWLF8nblkmclmPt7ch IqE+ZGmizsKpXAqzFPhp2FWCDybIa1TBhMudxN0teFUCAW0o/BOc2DpdoW4QssYK2fkA 9J5sDdnM0wZd8xLc/7cruU4hqFlK2QvsV5kVbR67myDJGYh/IdRQOsky7Qh9qELW9cGz GUHg== 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=PGtxy6rzblCKAXj6Ubugo5EmSieZODKJ/lNuzrxypdA=; b=prGd3yAmEqIdtJ2TAkVz7l839EtfBGG2jhWhV3p2WpXKTUe7am/j0feIZMN4uMeq2G DctfvYmh5ajfidrYPzBXLws3ed4eKQCgKRxhqqxo1wHT36JuPhdqCs/ShBmbVkhwEO7O tHB04OsJQkl1MqCIsKu+pVWuQ8zidFB4Lio5YkApJ6dq433Zg+0v9kEfgut2sG5GHTwY 3ta/46syacju+z1XcRVQBBkpGInkDrBLp3Iy+ro4/qXNT6SqwDZfR+TbsGJ9qu3lTtCF ygSH0CjEkI8F+kmK3FEeJxSOb/lk5aA1ebm7K5+4LYZ/xH5RlrSKZOi4848F/KfroSC8 BqqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GvP2EcnY; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id s4-20020a170902ea0400b001ab0727a2c0si7750871plg.424.2023.06.14.23.58.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Jun 2023 23:58:08 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GvP2EcnY; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 58DFF86232; Thu, 15 Jun 2023 08:57:49 +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="GvP2EcnY"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id F3D308622D; Thu, 15 Jun 2023 08:57:45 +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-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) (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 A26F9861F3 for ; Thu, 15 Jun 2023 08:57:43 +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-x42e.google.com with SMTP id ffacd0b85a97d-311183ef595so129958f8f.0 for ; Wed, 14 Jun 2023 23:57:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686812263; x=1689404263; 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=PGtxy6rzblCKAXj6Ubugo5EmSieZODKJ/lNuzrxypdA=; b=GvP2EcnYnP4+YMCVHVEj1Gi65uCJG61+9+SjWafz+0RmnhP1c1SbrilaLNO9J/TER9 CPnWrLDvA3C2u64aUI1sk7PUH1YMYoCmdFNaZhEjLvZYDmPfJXHQp92Fhie9J9qIAN+J F+M+NxB+OF7xdvBngvqrlWnhTnhpfOhLb1vqSXXBnzGWWxH5N6qinfWCkAEIycmtpyEP J7Cu1LvN0+AxN/h5j/M1aLgn/En5ROajdljU5imRJ9H3JrF0XSFTBL5KBeX2POQMv134 ZK9BdyCHP3LxsemcQaFYtp9WnGDpktB9GhwUSwwLmeCKd2aaxm8GBlPRdeqPK0jgNxlk urWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686812263; x=1689404263; 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=PGtxy6rzblCKAXj6Ubugo5EmSieZODKJ/lNuzrxypdA=; b=b5hR/e9kHjKh0+ScQ/eBFLKpA/p3i0LprpCSAGg+4Iw77IRr3OkRCNQfbM4hbhQYU1 kxFp0vqX1ndEO6ME0dTmdEJ5GTLGO54t01U4xQn7hkBeUVjsjVWDOhOHREIfyP/mgs4h gxnRhSJkgx1wsoTRMS8Ft0O8FzftkyT8WNgFqitfoLPl63x+/47Zftm/nP+q4vqHjRG6 c8grJ6Pf31G54QK0gdWFWqPIwbI5COAAj5qWeccVBB14J6pVB7D3qstnWqQcuSyQv9vF ycQWzWY0L0A+Iem+MWwbbl/LCxcTQEwx3e/bpZcacFcNj088s/zR5n920PmIOrs+vLFL MVXA== X-Gm-Message-State: AC+VfDyWKx2OG30bmLQsU1bTWR534KVkkpI32HiKE5SmQtSIYupKngD6 6Gdm7uoWbnIcJinsTPkTdBPvbcyKeuE8ol9TZQQWyA== X-Received: by 2002:adf:f1c3:0:b0:30a:e511:e65c with SMTP id z3-20020adff1c3000000b0030ae511e65cmr9922931wro.37.1686812262985; Wed, 14 Jun 2023 23:57:42 -0700 (PDT) Received: from localhost.localdomain (ppp089210114029.access.hol.gr. [89.210.114.29]) by smtp.gmail.com with ESMTPSA id r15-20020adfda4f000000b002fe96f0b3acsm20172607wrl.63.2023.06.14.23.57.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Jun 2023 23:57:42 -0700 (PDT) From: Ilias Apalodimas To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Heinrich Schuchardt Subject: [PATCH 2/2] efi_loader: make efi_remove_protocol() static Date: Thu, 15 Jun 2023 09:57:37 +0300 Message-Id: <20230615065737.323329-2-ilias.apalodimas@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230615065737.323329-1-ilias.apalodimas@linaro.org> References: <20230615065737.323329-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 Signed-off-by: Ilias Apalodimas Reviewed-by: Heinrich Schuchardt --- include/efi_loader.h | 4 ---- lib/efi_loader/efi_boottime.c | 6 +++--- 2 files changed, 3 insertions(+), 7 deletions(-) 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;