
On 7/15/19 12:29 AM, Bryan O'Donoghue wrote:
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
Your Signed-off-by should be the last line in the header.
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 --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,
/* 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 */bool overlap_only_ram);
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,
{ struct list_head *lhandle; struct efi_mem_list *newlist;bool overlap_only_ram)