diff mbox series

[U-Boot,v3,1/8] efi_loader: Change return type of efi_add_memory_map()

Message ID 20190714230108.25764-2-pure.logic@nexus-software.ie
State Superseded, archived
Delegated to: Heinrich Schuchardt
Headers show
Series efi_loader: Fix inconsistencies in efi_add_memory_map usage | expand

Commit Message

Bryan O'Donoghue July 14, 2019, 11:01 p.m. UTC
We currently have some inconsistent use of efi_add_memory_map()
throughout the code. In particular the return value of efi_add_memory_map()
is not interpreted the same way by various users in the codebase.

This patch changes efi_add_memory_map() to return efi_status_t. A
subsequent set of patches will change the internal values themselves and
finally the users of efi_add_memory_map().

Signed-off-by: Bryan O'Donoghue <pure.logic@nexus-software.ie>
Suggested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
 include/efi_loader.h        | 4 ++--
 lib/efi_loader/efi_memory.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/include/efi_loader.h b/include/efi_loader.h
index b07155cecb..69255f40ea 100644
--- a/include/efi_loader.h
+++ b/include/efi_loader.h
@@ -470,8 +470,8 @@  efi_status_t efi_get_memory_map(efi_uintn_t *memory_map_size,
 				efi_uintn_t *descriptor_size,
 				uint32_t *descriptor_version);
 /* Adds a range into the EFI memory map */
-uint64_t efi_add_memory_map(uint64_t start, uint64_t pages, int memory_type,
-			    bool overlap_only_ram);
+efi_status_t efi_add_memory_map(uint64_t start, uint64_t pages, int memory_type,
+				bool overlap_only_ram);
 /* Called by board init to initialize the EFI drivers */
 efi_status_t efi_driver_init(void);
 /* Called by board init to initialize the EFI memory map */
diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c
index 27379381e8..c5a8f3ab29 100644
--- a/lib/efi_loader/efi_memory.c
+++ b/lib/efi_loader/efi_memory.c
@@ -223,8 +223,8 @@  static s64 efi_mem_carve_out(struct efi_mem_list *map,
 	return EFI_CARVE_LOOP_AGAIN;
 }
 
-uint64_t efi_add_memory_map(uint64_t start, uint64_t pages, int memory_type,
-			    bool overlap_only_ram)
+efi_status_t efi_add_memory_map(uint64_t start, uint64_t pages, int memory_type,
+				bool overlap_only_ram)
 {
 	struct list_head *lhandle;
 	struct efi_mem_list *newlist;