aboutsummaryrefslogtreecommitdiffstats
path: root/mm/sparse-vmemmap.c
diff options
context:
space:
mode:
authorGautam Menghani <[email protected]>2022-06-12 18:23:20 +0000
committerakpm <[email protected]>2022-06-17 02:48:32 +0000
commit55896f935a60b919ce699d11754061f6df936a7d (patch)
tree8c6bf8fecbd79797fea633e981da90494caa87da /mm/sparse-vmemmap.c
parentselftests: make use of GUP_TEST_FILE macro (diff)
downloadkernel-55896f935a60b919ce699d11754061f6df936a7d.tar.gz
kernel-55896f935a60b919ce699d11754061f6df936a7d.zip
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/[email protected] Signed-off-by: Gautam Menghani <[email protected]> Reviewed-by: David Hildenbrand <[email protected]> Reviewed-by: Muchun Song <[email protected]> Reviewed-by: Joao Martins <[email protected]> Reviewed-by: Oscar Salvador <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'mm/sparse-vmemmap.c')
-rw-r--r--mm/sparse-vmemmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/sparse-vmemmap.c b/mm/sparse-vmemmap.c
index 49cb15cbe590..652f11a05749 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);