[Concept,15/18] efi: app: Use the same efi_free_pool() signature as loader

Message ID 20250820004039.3920254-16-sjg@u-boot.org
State New
Headers
Series efi: Move towards the EFI app booting EFI applications |

Commit Message

Simon Glass Aug. 20, 2025, 12:40 a.m. UTC
  From: Simon Glass <sjg@chromium.org>

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 <sjg@chromium.org>
---

 include/efi.h        | 8 ++++++++
 include/efi_loader.h | 8 --------
 lib/efi_client/efi.c | 4 +++-
 3 files changed, 11 insertions(+), 9 deletions(-)
  

Patch

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. */