From: Gautam Menghani Date: Sun, 12 Jun 2022 18:23:20 +0000 (-0700) Subject: mm/sparse-vmemmap.c: remove unwanted initialization in vmemmap_populate_compound_pages() X-Git-Tag: v6.1-rc5~688^2~255 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=55896f935a60b919ce699d11754061f6df936a7d;p=platform%2Fkernel%2Flinux-starfive.git mm/sparse-vmemmap.c: remove unwanted initialization in vmemmap_populate_compound_pages() Remove unnecessary initialization for the variable 'next'. This fixes the clang scan warning: Value stored to 'next' during its initialization is never read [deadcode.DeadStores] Link: https://lkml.kernel.org/r/20220612182320.160651-1-gautammenghani201@gmail.com Signed-off-by: Gautam Menghani Reviewed-by: David Hildenbrand Reviewed-by: Muchun Song Reviewed-by: Joao Martins Reviewed-by: Oscar Salvador Signed-off-by: Andrew Morton --- diff --git a/mm/sparse-vmemmap.c b/mm/sparse-vmemmap.c index 49cb15c..652f11a 100644 --- a/mm/sparse-vmemmap.c +++ b/mm/sparse-vmemmap.c @@ -737,7 +737,7 @@ static int __meminit vmemmap_populate_compound_pages(unsigned long start_pfn, size = min(end - start, pgmap_vmemmap_nr(pgmap) * sizeof(struct page)); for (addr = start; addr < end; addr += size) { - unsigned long next = addr, last = addr + size; + unsigned long next, last = addr + size; /* Populate the head page vmemmap page */ pte = vmemmap_populate_address(addr, node, NULL, NULL);