From patchwork Wed Aug 20 11:23:27 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 71 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755689066; bh=1OOXL8Hm+PkoGS3VM2VBqSCGABAf3AxbQJxNpCcunoY=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=IM2x/904jTE7hijPdVFxSiwdMtql8QsaXnwODbpmDwoAApK5HPGcPZXYX0F9uEmdA jioBBYuw2Zvjr1BvnJpUOCxJHy5rco0Hkp3rKw3icthaRcGzUDGL72wyg3vD5L8Bnx FVQgv2ifjQtK19ZwOUDbsGn9L4Dt/r+e1mG2KlqSMLlsbwQ4mCcGGxSoWLjI1wN2jn du8FznRxHaHGftQ/Q1sEEtKQOowxNL75xwxvjc4gDKCiU3pM4x+sjXkvgLiaLfCsPn FTtGI7/TJauPs53bCfagjjq6eFDNxiUHIjUTxlziyQb4qxNNkmCoQxVa7CG2bxaL5F RzCaeMnVWQi5w== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 93A9967691 for ; Wed, 20 Aug 2025 05:24:26 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id w4F5KBIq3Xfn for ; Wed, 20 Aug 2025 05:24:26 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755689066; bh=1OOXL8Hm+PkoGS3VM2VBqSCGABAf3AxbQJxNpCcunoY=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=IM2x/904jTE7hijPdVFxSiwdMtql8QsaXnwODbpmDwoAApK5HPGcPZXYX0F9uEmdA jioBBYuw2Zvjr1BvnJpUOCxJHy5rco0Hkp3rKw3icthaRcGzUDGL72wyg3vD5L8Bnx FVQgv2ifjQtK19ZwOUDbsGn9L4Dt/r+e1mG2KlqSMLlsbwQ4mCcGGxSoWLjI1wN2jn du8FznRxHaHGftQ/Q1sEEtKQOowxNL75xwxvjc4gDKCiU3pM4x+sjXkvgLiaLfCsPn FTtGI7/TJauPs53bCfagjjq6eFDNxiUHIjUTxlziyQb4qxNNkmCoQxVa7CG2bxaL5F RzCaeMnVWQi5w== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 4DF3567680 for ; Wed, 20 Aug 2025 05:24:26 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755689064; bh=eFZXgFXCRA/YgaOjyujjHLq6P/I3bayush8D+6FytpI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Frb0J8qlanVHE4qA+yA4PEFUCHMKgYJTkHX8guICu8imTQPsiXWZ/nuezu2bizoOb iEiD2+uZq3DUq3cGUHmoJ2AYptq6ZCWD5wiXmSIqVC0Iu/x019JkkNuADztNCx8jBQ ED8Hla8uKRzjlT20soQF7xhDsVkwkTMfPqBbOwwzG+ExDq1lOzrYpdj/mgtSpCYj9F bt4ZOp7EM2nI9g7VvuEyzxIKb9nop2zYL9pd07YZmXEVlJA//b9BAaq9G8+E45aMpn DyusepdVDJ9ls7CTpbW2XpEoCajwTZNrX/amcmv2wo8SfmXxjAQZT5l+gNiyj3X71p zxJezN3hOM70Q== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 80D8D6769E; Wed, 20 Aug 2025 05:24:24 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id qXfAmOE7W5-P; Wed, 20 Aug 2025 05:24:24 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755689057; bh=sNsOC+XUJQs/fQlYkJHAgs3tMjuGSB6zSRiO6opSKY8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SO++tnzQl7yv5+W3DZj0QSVDRF8rjYcIvqbgb/4t6dFowl7pU1xsp68RTE8CCF8ep unVsfzTz4srppBdtEjFblLDnctjKr+VamccQPIJ0E7i204BQ2/AZ+0Am7jUAf6FSU9 6zBtxjejBJPhJ7EAW7hyv1IRXsqixkFyjBBSFM5LTysOsILTF1RFZR4Pw52ZfDwijY mX6zlibfC6k+1ieCsBe4JEsoZvYUaXp3Lk/LdoUxbyeNNACcuM4gXnvCum+X4AysTX HmSwJZRTrdG0AijOyhrQQFc5UYKiBosmoFbGGoEDYNKhfrSBvN3bsEws4q/aSZoT/6 Oi87YwgVwHVDg== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 75A746767D; Wed, 20 Aug 2025 05:24:17 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Wed, 20 Aug 2025 05:23:27 -0600 Message-ID: <20250820112340.147082-16-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250820112340.147082-1-sjg@u-boot.org> References: <20250820112340.147082-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: CFZJIS7UQIVI2LFJI46PURIG6A4IFXLC X-Message-ID-Hash: CFZJIS7UQIVI2LFJI46PURIG6A4IFXLC X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Heinrich Schuchardt , Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH v2 15/18] efi: app: Use the same efi_free_pool() signature as loader List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass The app has a function of this name, but it does not return any value. Return success (always) so that we can use the same signature. Signed-off-by: Simon Glass --- (no changes since v1) include/efi.h | 8 ++++++++ include/efi_loader.h | 8 -------- lib/efi_client/efi.c | 4 +++- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/include/efi.h b/include/efi.h index 28c297d87db..54da1540d0b 100644 --- a/include/efi.h +++ b/include/efi.h @@ -662,6 +662,14 @@ void *efi_malloc(struct efi_priv *priv, int size, efi_status_t *retp); */ void efi_free(struct efi_priv *priv, void *ptr); +/** + * efi_free_pool() - free memory from pool + * + * @buffer: start of memory to be freed + * Return: status code + */ +efi_status_t efi_free_pool(void *buffer); + /** * efi_puts() - Write out a string to the EFI console * diff --git a/include/efi_loader.h b/include/efi_loader.h index c4d9c4f1c7c..2d5e8de0132 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -891,14 +891,6 @@ efi_status_t efi_free_pages(uint64_t memory, efi_uintn_t pages); efi_status_t efi_allocate_pool(enum efi_memory_type pool_type, efi_uintn_t size, void **buffer); -/** - * efi_free_pool() - free memory from pool - * - * @buffer: start of memory to be freed - * Return: status code - */ -efi_status_t efi_free_pool(void *buffer); - /* Allocate and retrieve EFI memory map */ efi_status_t efi_get_memory_map_alloc(efi_uintn_t *map_size, struct efi_mem_desc **memory_map); diff --git a/lib/efi_client/efi.c b/lib/efi_client/efi.c index 739010e60e3..12a646a36b7 100644 --- a/lib/efi_client/efi.c +++ b/lib/efi_client/efi.c @@ -190,11 +190,13 @@ void *efi_alloc(size_t size) return efi_malloc(priv, size, &ret); } -void efi_free_pool(void *ptr) +efi_status_t efi_free_pool(void *ptr) { struct efi_priv *priv = efi_get_priv(); efi_free(priv, ptr); + + return 0; } /* helper for debug prints.. efi_free_pool() the result. */