From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dave Young Subject: [PATCH v6 03/14] efi: remove unused variables in __map_region Date: Mon, 16 Dec 2013 17:30:24 +0800 Message-ID: <1387186235-15972-4-git-send-email-dyoung@redhat.com> References: <1387186235-15972-1-git-send-email-dyoung@redhat.com> Return-path: In-Reply-To: <1387186235-15972-1-git-send-email-dyoung@redhat.com> Sender: linux-kernel-owner@vger.kernel.org To: linux-kernel@vger.kernel.org Cc: linux-efi@vger.kernel.org, x86@kernel.org, mjg59@srcf.ucam.org, hpa@zytor.com, James.Bottomley@HansenPartnership.com, vgoyal@redhat.com, ebiederm@xmission.com, horms@verge.net.au, kexec@lists.infradead.org, bp@alien8.de, greg@kroah.com, matt@console-pimps.org, toshi.kani@hp.com, akpm@linux-foundation.org, mingo@kernel.org, msalter@redhat.com, leif.lindholm@linaro.org List-Id: linux-efi@vger.kernel.org variables size and end is useless in this function, thus remove them. Reported-by: Toshi Kani Signed-off-by: Dave Young Acked-by: Borislav Petkov --- arch/x86/platform/efi/efi_64.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/arch/x86/platform/efi/efi_64.c b/arch/x86/platform/efi/efi_64.c index bf286c3..c5a6491 100644 --- a/arch/x86/platform/efi/efi_64.c +++ b/arch/x86/platform/efi/efi_64.c @@ -148,15 +148,11 @@ void efi_setup_page_tables(void) static void __init __map_region(efi_memory_desc_t *md, u64 va) { pgd_t *pgd = (pgd_t *)__va(real_mode_header->trampoline_pgd); - unsigned long pf = 0, size; - u64 end; + unsigned long pf = 0; if (!(md->attribute & EFI_MEMORY_WB)) 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)) pr_warn("Error mapping PA 0x%llx -> VA 0x%llx!\n", md->phys_addr, va); -- 1.8.3.1