From patchwork Thu Jun 15 06:57:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilias Apalodimas X-Patchwork-Id: 693001 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d91:0:0:0:0:0 with SMTP id b17csp375196wru; Wed, 14 Jun 2023 23:57:52 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6qR7ZeuxJbzCcEpo6aKYgnCkDHo+BQQGUIdmw4ipxNNECKt3A4JDng9UPNMv/S1HMNWx1u X-Received: by 2002:a17:902:b214:b0:1b0:6480:1788 with SMTP id t20-20020a170902b21400b001b064801788mr12585071plr.61.1686812272580; Wed, 14 Jun 2023 23:57:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686812272; cv=none; d=google.com; s=arc-20160816; b=fU/z4F8BDE4D+VyVhbZutCiS2uDzV+OWGHoq/MaX+NTT8Tcp7yPZ73QNytRFHFaA+q a8pyVl+7gjLVltwmHxSmt0DUnJllFmF+ItcmFAkpq7WiNW1eh7T0M2jQM4ZMdSPXQ+dm mixYJq6or2g6uEEy7C8FEqIF8JJn9U8WXtFZIUMFGFtHOR4FnqsGxM962mxxRS6Vjp2q /JBtS3gria2Lrf9IgUXUj4UWBj07ywTXlVFv7p9hx06ZbOuRRkn/pl+jISsG2WOvs8ZC 0dPtWskwzEJTizAiuDFhtKCTWyzeshgMGfJ+WfosTJZSHETaXnV5orywmcbkqQc+oy4E tfFA== 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:message-id:date:subject:cc:to:from:dkim-signature; bh=DSfkMY5H7sSI4bzRshsxDlraPM7DGCFbiDNm+0RqXLQ=; b=xeNTMHurKvspcxKw3v5ggC//wLWblR5imuLvXi/jJvBrce6vnbrOT7jGE2ntZfZIqK eO/AOILvy/N65Xwmu57ZJoTdS+72UJB9imFPV4tJJXGBk1mThbmtBSqLW5kHW2lspC8X UDuriDSfaKEIUtGNt9InwKA/7cCRYCNpFZAoHhQV1r5IKDI24g8Lri2uHbS0ppeiVyn0 rxmKYxrcr5x9UMHdjXf9ZfOfg491InR4ZFTSSIScBQ0mxWeNJTZgQwj3RIg09krlz8Ea UYtrxBNdpZ0JAHf5JlBpFWQg91vEbqAnBZ4jt+WuVTBeSR5ywHVmFpzlvxZGzUpvQKxW GSwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fuluVc55; 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 s6-20020a170902ea0600b001ab29e16b3asi8135577plg.286.2023.06.14.23.57.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Jun 2023 23:57:52 -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=fuluVc55; 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 DE22186201; Thu, 15 Jun 2023 08:57:45 +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="fuluVc55"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id EB1A28622D; Thu, 15 Jun 2023 08:57:43 +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-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) (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 45C0280B98 for ; Thu, 15 Jun 2023 08:57:41 +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-lf1-x12a.google.com with SMTP id 2adb3069b0e04-4f62cf9755eso9846345e87.1 for ; Wed, 14 Jun 2023 23:57:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686812260; x=1689404260; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=DSfkMY5H7sSI4bzRshsxDlraPM7DGCFbiDNm+0RqXLQ=; b=fuluVc55Yaqq48Md+6Qlvvf2h3BDkYuPFtuW3EwoE73Pz0faLAIk1mo3ZHKK09fmsQ c3VTCWosebE0nfB18b8wlcXZNk0Xt0bxYNTOG4X0FaTcIZm3abdXYwD72P95wcF6RGBw 1VB34UIskW2u33Ji+8kRsiTEXgEgmMb+hZb0c9oRTWAk3zTZlzhUKEbfnDcMdWoqfYGo rHHQ7MnbXWzP/nuMQg7RW2VC1NbWY5JlfK0NyaHznZZNZhPXWgwRHfG1Ni9B9D8sm/pF 4P+qzxwAfchpnBxEOG9u5Y25VqX/xBuNHrxbIZe0KBYC53E2fbktZWBxCf3AUBQmpJ9S O8hg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686812260; x=1689404260; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=DSfkMY5H7sSI4bzRshsxDlraPM7DGCFbiDNm+0RqXLQ=; b=VIuLylLwTiCPkBntdKSQ9qn4eFjht6DPxdCQMxN1M/qQi0xm5/3eQlbmaqTW7srf4y KH0NREzHoa9zgnXSJs8U6Ax05PlZX+D+5zJ/FYCqybpPCZf1vy70Wc2p5CTitni2g+tG YHcVyUUDYJpa0kIHuQqmY7SUU3YHaQcW2ICY1KBGxBzWJmFb01nTYxRq5KbQLyIYvpvU //wX0aq0ZlLZqV7J3QTUbz6pUHS+9yI2emMBmAQDeI1Ga+W6PFmUgO+MXun5k9+yFvV6 J8yU5o1K0vvwe5F3l3iepV9PDcQucPGeQiuDoBeXJ30KucieYkbp5+wk5E+vMC3Zbf7u mlXw== X-Gm-Message-State: AC+VfDwZcNSqyxCCPirQrFMckPt0Ci+fLlxi2w2VL2s+B0eWw7/ak3Pt u15qKt28Zuu9+LG2rQlmrf6fBgQ8EALAjQgHU8TgXw== X-Received: by 2002:a05:6512:457:b0:4f3:a91c:23d0 with SMTP id y23-20020a056512045700b004f3a91c23d0mr10094018lfk.31.1686812260483; Wed, 14 Jun 2023 23:57:40 -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.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Jun 2023 23:57:40 -0700 (PDT) From: Ilias Apalodimas To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Heinrich Schuchardt Subject: [PATCH 1/2] efi_loader: use efi_install_multiple_protocol_interfaces() Date: Thu, 15 Jun 2023 09:57:36 +0300 Message-Id: <20230615065737.323329-1-ilias.apalodimas@linaro.org> X-Mailer: git-send-email 2.39.2 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 The tcg protocol currently adds and removes protocols with efi_(add/remove)_protocol(). Although this works fine protocol interfaces should be installed using the EFI API functions instead of the internal API ones Signed-off-by: Ilias Apalodimas --- lib/efi_loader/efi_tcg2.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/efi_loader/efi_tcg2.c b/lib/efi_loader/efi_tcg2.c index a83ae7a46cf3..49f8a5e77cbf 100644 --- a/lib/efi_loader/efi_tcg2.c +++ b/lib/efi_loader/efi_tcg2.c @@ -1680,8 +1680,8 @@ void tcg2_uninit(void) if (!is_tcg2_protocol_installed()) return; - ret = efi_remove_protocol(efi_root, &efi_guid_tcg2_protocol, - (void *)&efi_tcg2_protocol); + ret = efi_uninstall_multiple_protocol_interfaces(efi_root, &efi_guid_tcg2_protocol, + &efi_tcg2_protocol, NULL); if (ret != EFI_SUCCESS) log_err("Failed to remove EFI TCG2 protocol\n"); } @@ -2507,8 +2507,8 @@ efi_status_t efi_tcg2_register(void) goto fail; } - ret = efi_add_protocol(efi_root, &efi_guid_tcg2_protocol, - (void *)&efi_tcg2_protocol); + ret = efi_install_multiple_protocol_interfaces(&efi_root, &efi_guid_tcg2_protocol, + &efi_tcg2_protocol, NULL); if (ret != EFI_SUCCESS) { tcg2_uninit(); goto fail; 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;