From patchwork Wed Aug 20 00:40:29 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 53 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=1755650498; bh=VaT8/GuHG7ndzI9LyerQcuPJGQvKYdbQWf36pipaofo=; 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=Uvi3X1TjUN1SSgJ/aI2POEWM2F3mO6rN5rt9Q39pzfn3LjxHq4R0TaT4D55XKGJ8+ +52PdeyL2dB1i/IgokQzk3wBZ6OXF7ZCH6ydF/j7TwOMXz74Tp/LVH8XzlIa0L5ZSy 8lKreOEM0DGGMEEG7CrfOpvac5Zf170u7s1p06fn7fyQMqV4AxHvpAU8kggRswco5s FUinK6BQwGUdpi4jaj8BnoDDK2kjHxZ2QV0DpvnqqbC3uzF05921731S+pB55s3rCS Q+dgSLmbvHgwbMdqBtPYyiFrfkY8cFZDxKnnhxzFk/dbhQUfGvv9pwD/pRlOutWaQH DAN7kLgbjTNZQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 95051675EE for ; Tue, 19 Aug 2025 18:41:38 -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 A_QoYOoSgcN9 for ; Tue, 19 Aug 2025 18:41:38 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755650496; bh=VaT8/GuHG7ndzI9LyerQcuPJGQvKYdbQWf36pipaofo=; 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=Ar01m1pstQH03dIJI+3lect8rAO5AzzW/cS2gI1YaZdI6+zfQ5ojfQQygiaflaely IktjWZrQm340lGYijNXO3bjjIv40hAW1Y9NOtZGaxsXZOi3NIwsYXeH8hdbYW9nBiE X/QZ9AKjVWYsNwPjW0+XK/NnOZykRjaIYNyo/XTnLbTGgQ0lE/xKdNDGrOcThkSEV+ tfhEi+GhXyNvf+Dpu8nW89Qbe3sTEwX1/nwAQ2sSalMGelXiH3ctQH6RfET6a6iFxi nyq5Ke0i+eQ0Qwc6UDeGYNnK5oibcpxNoKMlPI27mW2Sply+ojgrwzwqVnSN9U7KAm szM9BpVfSVjJg== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 911826765F for ; Tue, 19 Aug 2025 18:41:36 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755650494; bh=bDF/M87EW15F8YhJJwKRYwDZqE2W5Sv+wWlaFvvxw2I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=db8WOIxZxIy/3vy/hPpoKxP2We6fylUPqNgNaCN6us5WS9zz2QKfhL51sDKY830Bb Z+7GlkdmQ7UdJ2EPEckUXAc9plK9I7DNXh/bIicO+rYuYnO5EPoUfBtKXISV7KM9bu XNbFchYhvPUkoov5B/gV1sdlTytxbpOsIc1sw1bAr9d+skxXHVEESMEB7skhhSeR+E prAjZGG8zwG2qVcMxJlj2PmGptXBZyx9GnLgqUpAaQwC3iyy+9A4O15/kRBI7ABIP8 FnrfoizCcdT1bDCa3ddQLrBbmAy4yg59huJksAtZOd+5dEnmOuc/u2arDykX9bBPch UTB3NcD50E93w== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id BF844675B8; Tue, 19 Aug 2025 18:41:34 -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 9Y--jvD-qQ5u; Tue, 19 Aug 2025 18:41:34 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755650489; bh=ZlX0fgRnHv+tJl6lmoMT+B2JILZq12z9ss0aOLnnsWQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ocl2CG/7JrbWlzq1VgqRxiO1HuxVXoY5lu0JOJhwCOJT383TpQ+iqTpzw89FReyQJ rjwAdzvHJBIcZ90DwPDWdvxsq4NGbpMUiO8iySg3M0Bj9kTNfWbUFsxAjhs5gAMYdo liI6atiD/e14fYwpaCV09cmSwVQy76vpuh4sttVyjBJDcHo3M+6RTdIcZVLCBG1tbh OGvx40BZ7pJa8ZjCvmvCoOHUCvGB4uoLq5y5+jeIoNIXChh2nCS7zf9ZC9FKZGvdVd Onh81hW0D0u7Jz+dM91bwNGIxBtiqwOnXNGpIOZfDl6jMDgZ/NEj99H2xV2X0p/ekU TVx39KGq7xj3Q== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id A487A6765D; Tue, 19 Aug 2025 18:41:29 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Tue, 19 Aug 2025 18:40:29 -0600 Message-ID: <20250820004039.3920254-16-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250820004039.3920254-1-sjg@u-boot.org> References: <20250820004039.3920254-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: GP7MQA7Q5CZDYTGSBXQFS7P3E2BAELSK X-Message-ID-Hash: GP7MQA7Q5CZDYTGSBXQFS7P3E2BAELSK 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 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 --- 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. */