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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DDAE4C433F5 for ; Fri, 1 Oct 2021 05:09:10 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 632DB61994 for ; Fri, 1 Oct 2021 05:09:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 632DB61994 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6C97B8348E; Fri, 1 Oct 2021 07:05:29 +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="MvkuiY72"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2820281EE5; Fri, 1 Oct 2021 07:04:54 +0200 (CEST) Received: from mail-pg1-x530.google.com (mail-pg1-x530.google.com [IPv6:2607:f8b0:4864:20::530]) (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 237E38344D for ; Fri, 1 Oct 2021 07:04:44 +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=takahiro.akashi@linaro.org Received: by mail-pg1-x530.google.com with SMTP id g184so8368255pgc.6 for ; Thu, 30 Sep 2021 22:04:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=L0tO99RHHL4KQN7RYjqTxDr3uBNsF0Bss6lY1EesGwM=; b=MvkuiY72V2ngYAgrSvdQXWIoXQRyfLYFxin62zE23hCAeACcA2Sbr9sVBpUnimPPae igLZ8WYjMeYJPVobuRnXctlv7xvM3IKGlsDzAlEgiSaK/q3UuX3GWh+8hju2pUonFU31 dud4RMGed2Wutl8L14rh+Ws/ywaGcuJm/0gzskrdsVzJXjcksJfq0S8q+0Z2jLMwZc4y 7UvCy6p3PKwM+olXx0wP629cZ3gnMSWKf10w9LG475QgVxxVR3O836eb6ogxGRsFTbOL C6BBnha/a1Vg4plaNVe/DV5XWFC5RIRcrIJomlh1Le4CmHk3pwO0v2SzzPhd9un/VnCC caTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=L0tO99RHHL4KQN7RYjqTxDr3uBNsF0Bss6lY1EesGwM=; b=KTlozT6XgaZ8kX46v3S/K2yiOZ4qFIMCcA/3LBTEqGTlZKPbghOmYW5qA91T48lzJE j1OfX1AfCnLXq+3kl9M3VyCt1fYGwr8GvYkd3faqGwE1clR1eeGh6kzWcPmLNiKkTEn5 MlxEW4rzmKQcIUmJOURtUIgX0VA8fYlPK6RwZAvucvu1BWfVvcyBwu/+bEuk84IS7ta4 sUTRiML5c5VEGglJLMvkGD+W+N11xMo2kSPhK3hP6wIyDQgqpmShOLUxKelSWpEDTo2v g+Rl6vGQesCWuNHLo68qwQKpEBH3Z9+dTHmjK4FhjWqfBp2g+AJif4KJywQRQ+3ZIHPQ j4Qw== X-Gm-Message-State: AOAM53254H8ZE2kUcBLOM0VDdzVoqDYrMPtlkEjKC257xFxqyXPnCMQP mEfZPFT/+6/bJV2MGqeokhPOGw== X-Google-Smtp-Source: ABdhPJwyrQfXj4/4p75Z8CiY4/CS+mYhA5meVg0//9a1wSQogmkdjHbIQAtHoOIwrTsnDOu3cDRhXA== X-Received: by 2002:a65:62d5:: with SMTP id m21mr8310723pgv.124.1633064682281; Thu, 30 Sep 2021 22:04:42 -0700 (PDT) Received: from localhost.localdomain (122-100-26-52m5.mineo.jp. [122.100.26.52]) by smtp.gmail.com with ESMTPSA id z8sm4615113pgc.53.2021.09.30.22.04.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Sep 2021 22:04:41 -0700 (PDT) From: AKASHI Takahiro To: xypron.glpk@gmx.de, agraf@csgraf.de, sjg@chromium.org, ilias.apalodimas@linaro.org Cc: u-boot@lists.denx.de, AKASHI Takahiro Subject: [RFC 17/22] efi_loader: add efi_remove_handle() Date: Fri, 1 Oct 2021 14:02:17 +0900 Message-Id: <20211001050228.55183-34-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211001050228.55183-1-takahiro.akashi@linaro.org> References: <20211001050228.55183-1-takahiro.akashi@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean This function is a counterpart of efi_add_handle() and will be used in order to remove an efi_disk object in a later patch. Signed-off-by: AKASHI Takahiro --- include/efi_loader.h | 2 ++ lib/efi_loader/efi_boottime.c | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/include/efi_loader.h b/include/efi_loader.h index cfbe1fe659ef..50f4119dcdfb 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -579,6 +579,8 @@ void efi_save_gd(void); void efi_runtime_relocate(ulong offset, struct efi_mem_desc *map); /* Add a new object to the object list. */ void efi_add_handle(efi_handle_t obj); +/* Remove a object from the object list. */ +void efi_remove_handle(efi_handle_t obj); /* Create handle */ efi_status_t efi_create_handle(efi_handle_t *handle); /* Delete handle */ diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index f0283b539e46..b2503b74233b 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -503,6 +503,14 @@ void efi_add_handle(efi_handle_t handle) list_add_tail(&handle->link, &efi_obj_list); } +void efi_remove_handle(efi_handle_t handle) +{ + if (!handle) + return; + + list_del(&handle->link); +} + /** * efi_create_handle() - create handle * @handle: new handle -- 2.33.0