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 7320FC433EF for ; Fri, 1 Oct 2021 05:08:48 +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 E3E0C611C8 for ; Fri, 1 Oct 2021 05:08:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E3E0C611C8 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 6CCD283453; Fri, 1 Oct 2021 07:05:23 +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="Y7KOFyjr"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B44D383453; Fri, 1 Oct 2021 07:04:46 +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 283788316B for ; Fri, 1 Oct 2021 07:04:37 +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 133so8385403pgb.1 for ; Thu, 30 Sep 2021 22:04:37 -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=Y7KOFyjrz2NTfd2CHfewsXXkaQqHEFa2XMa+jJyxSCZpvLPq+FaDWq7YN/R9Os5ji9 fDBT2lqMFs1O1qKo1SHOcI10ZtRkUrMi/BAXI1NC56W2l5dQkV+fPRbwAGfifuhRbOFe FtLoIe9ZVNr9I8BOp6O1DhEZCIGTVb0jJ7ke0a2FvibPk7LySVzfKuw68ElckJSFbVpG 1FzZD5p+R7KCEe1NS1LkFzP/mXjaxzngyO3PTxu6+eWq4YJfGJpbdBVGQP0Zvk5NjQqE ljHZcIuHJ6yMKEAIjNrtUUj7CbnVPsMcy67Hr0yRiMsnWkE1k2q8HUdt8Ta7DYrF2pM4 NDNw== 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=a/HoQEiwzXUbpizOFeb6FEh3qdf/Zq4YQBJ+dltWtjT2syeieSXatW27u5ntFS1BCM V56vZKzoihb11Vyxgcc36NZYl8Ml4IwDd4JY6I5xwBkpq0expik59Obsxu8xl5Slf4WM FKoqFb9dxHR2UcmyDNats/5zvhuoVuuNO8KrPX5wDj2btv7mCnPeTf6YikrPd8482Jmi 4q7e3HMxORKsSmAPyp2MiEJya5lhSGrBVT1NG87zaKxhPXo/ZHOVjR4v23CGO2pmPep4 Ou+eyrwNKO1SwB6NSDQ+82KxfOWYaua+5/qfEY0XiSIekocnU4vOY+Da3JYKNfky8vrS jiFA== X-Gm-Message-State: AOAM532o++dEmVWHbbJJ4JuA4HFwXL/r+eQcbqa8Cfvdy0mEm5AJ4yz7 c74ONjf9oJs/MCV9TJn60nf6zg== X-Google-Smtp-Source: ABdhPJy4UR5Nk7RH/7xT4uMEjYhm1ESvZlf+aELFGRgPJsc4E0Va2mtEv0ZnAyuSHtlB+c84rT3tXw== X-Received: by 2002:a05:6a00:cd4:b0:44b:b523:4d7 with SMTP id b20-20020a056a000cd400b0044bb52304d7mr8191663pfv.72.1633064675343; Thu, 30 Sep 2021 22:04:35 -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.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Sep 2021 22:04:34 -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 16/22] efi_loader: add efi_remove_handle() Date: Fri, 1 Oct 2021 14:02:15 +0900 Message-Id: <20211001050228.55183-32-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