Commit 2da6e57c authored by Dave Young's avatar Dave Young Committed by Matt Fleming

x86/efi: Remove unused variables in __map_region()

variables size and end is useless in this function, thus remove them.
Reported-by: default avatarToshi Kani <toshi.kani@hp.com>
Tested-by: default avatarToshi Kani <toshi.kani@hp.com>
Signed-off-by: default avatarDave Young <dyoung@redhat.com>
Acked-by: default avatarBorislav Petkov <bp@suse.de>
Signed-off-by: default avatarMatt Fleming <matt.fleming@intel.com>
parent 61d06697
...@@ -148,15 +148,11 @@ void efi_setup_page_tables(void) ...@@ -148,15 +148,11 @@ void efi_setup_page_tables(void)
static void __init __map_region(efi_memory_desc_t *md, u64 va) static void __init __map_region(efi_memory_desc_t *md, u64 va)
{ {
pgd_t *pgd = (pgd_t *)__va(real_mode_header->trampoline_pgd); pgd_t *pgd = (pgd_t *)__va(real_mode_header->trampoline_pgd);
unsigned long pf = 0, size; unsigned long pf = 0;
u64 end;
if (!(md->attribute & EFI_MEMORY_WB)) if (!(md->attribute & EFI_MEMORY_WB))
pf |= _PAGE_PCD; pf |= _PAGE_PCD;
size = md->num_pages << PAGE_SHIFT;
end = va + size;
if (kernel_map_pages_in_pgd(pgd, md->phys_addr, va, md->num_pages, pf)) if (kernel_map_pages_in_pgd(pgd, md->phys_addr, va, md->num_pages, pf))
pr_warn("Error mapping PA 0x%llx -> VA 0x%llx!\n", pr_warn("Error mapping PA 0x%llx -> VA 0x%llx!\n",
md->phys_addr, va); md->phys_addr, va);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment