From 74d022921ad3a06cbb14274214d53bf1102de437 Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Fri, 22 Sep 2006 16:45:33 +0900 Subject: kexec-tools: Use memdesc_size directly in patch_efi_memmap() Just use boot_param->efi_memdesc_size directly instead, it seems at least as clean, and possibly easier to follow. Signed-Off-By: Simon Horman --- purgatory/arch/ia64/purgatory-ia64.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/purgatory/arch/ia64/purgatory-ia64.c b/purgatory/arch/ia64/purgatory-ia64.c index 9420f5f..8588e9b 100644 --- a/purgatory/arch/ia64/purgatory-ia64.c +++ b/purgatory/arch/ia64/purgatory-ia64.c @@ -152,12 +152,12 @@ patch_efi_memmap(struct kexec_boot_params *params, { void *dest = (void *)params->efi_memmap_base; void *src = (void *)boot_param->efi_memmap; - unsigned long memdesc_size = boot_param->efi_memdesc_size; uint64_t orig_type; efi_memory_desc_t *src_md, *dst_md; void *src_end = src + boot_param->efi_memmap_size; int i; - for (; src < src_end; src += memdesc_size, dest += memdesc_size) { + for (; src < src_end; src += boot_param->efi_memdesc_size, + dest += boot_param->efi_memdesc_size) { unsigned long mstart, mend; src_md = src; dst_md = dest; @@ -180,7 +180,7 @@ patch_efi_memmap(struct kexec_boot_params *params, continue; while (seg->end > mend && src < src_end) { - src += memdesc_size; + src += boot_param->efi_memdesc_size; src_md = src; /* TODO check contig and attribute here */ mend = src_md->phys_addr + @@ -191,7 +191,7 @@ patch_efi_memmap(struct kexec_boot_params *params, end_pages = (mend - seg->end) >> EFI_PAGE_SHIFT; if (start_pages) { dst_md->num_pages = start_pages; - dest += memdesc_size; + dest += boot_param->efi_memdesc_size; dst_md = dest; *dst_md = *src_md; } @@ -200,7 +200,7 @@ patch_efi_memmap(struct kexec_boot_params *params, dst_md->type = seg->reserved ? EFI_UNUSABLE_MEMORY:EFI_LOADER_DATA; if (end_pages) { - dest += memdesc_size; + dest += boot_param->efi_memdesc_size; dst_md = dest; *dst_md = *src_md; dst_md->phys_addr = seg->end; -- cgit