[patch 4/9 v3] efi: cleanup efi_enter_virtual_mode function

Borislav Petkov bp at alien8.de
Thu Nov 21 11:49:29 EST 2013


On Thu, Nov 21, 2013 at 02:17:08PM +0800, dyoung at redhat.com wrote:
> Add two small functions:
> efi_merge_regions and efi_map_regions, efi_enter_virtual_mode
> calls them instead of embedding two long for loop.
> 
> v1->v2:
> refresh; coding style fixes.
> 
> v2->v3:
> Toshi Kani:
> remove unused variable
> Matt: check return value of krealloc.
> 
> Signed-off-by: Dave Young <dyoung at redhat.com>

Same short comment nitpick as earlier :)

Otherwise:

Acked-by: Borislav Petkov <bp at suse.de>

> ---
>  arch/x86/platform/efi/efi.c |  109 ++++++++++++++++++++++++++------------------
>  1 file changed, 66 insertions(+), 43 deletions(-)
> 
> --- efi.orig/arch/x86/platform/efi/efi.c
> +++ efi/arch/x86/platform/efi/efi.c

[ … ]

> @@ -837,6 +805,18 @@ void __init efi_enter_virtual_mode(void)
>  		prev_md = md;
>  
>  	}
> +}
> +
> +/*
> + * Map efi memory ranges for runtime serivce and
> + * update new_memmap with virtual addresses.
> + */

Stretch comment to 80 cols:

/*
 * Map efi memory ranges for runtime serivce and update new_memmap with virtual
 * addresses.
 */

like it is customary for the rest of the file.

> +static void * __init efi_map_regions(int *count)
> +{
> +	efi_memory_desc_t *md;
> +	void *p, *new_memmap = NULL;
> +	unsigned long size;
> +	u64 end, systab;
>  
>  	for (p = memmap.map; p < memmap.map_end; p += memmap.desc_size) {
>  		md = p;

-- 
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--



More information about the kexec mailing list