[U-Boot] [PATCH v2 1/7] efi_loader: Change return type of efi_add_memory_map()

Heinrich Schuchardt xypron.glpk at gmx.de
Sun Jul 14 23:23:05 UTC 2019


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 at nexus-software.ie>
Your Signed-off-by should be the last line in the header.

> Suggested-by: Heinrich Schuchardt <xypron.glpk at 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,
> +				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;
>



More information about the U-Boot mailing list