Skip to contentSkip to conversation

powerpc/mm: fix "section_base" set but not used

PATCH Applied Qian Cai 2 participants 2 messages Mar 1, 2019 – Mar 4, 2019 PowerPC

lore
Share & tools
lore

Qian Cai

author
#0 lore raw

PATCH v2 1/1 powerpc/mm: fix "section_base" set but not used

The commit 24b6d4164348 ("mm: pass the vmem_altmap to vmemmap_free") removed a line in vmemmap_free(),

altmap = to_vmem_altmap((unsigned long) section_base);

but left a variable no longer used.

arch/powerpc/mm/init_64.c: In function 'vmemmap_free':
arch/powerpc/mm/init_64.c:277:16: error: variable 'section_base' set but not used [-Werror=unused-but-set-variable]

---

v2: improve the commit message.

 arch/powerpc/mm/init_64.c | 2 --
 1 file changed, 2 deletions(-)
arch/powerpc/mm/init_64.c +0 -2
index a5091c034747..a4c155af1597 100644
@@ -274,7 +274,6 @@ void __ref vmemmap_free(unsigned long start, unsigned long end,
 
 	for (; start < end; start += page_size) {
 		unsigned long nr_pages, addr;
-		struct page *section_base;
 		struct page *page;
 
 		/*
@@ -290,7 +289,6 @@ void __ref vmemmap_free(unsigned long start, unsigned long end,
 			continue;
 
 		page = pfn_to_page(addr >> PAGE_SHIFT);
-		section_base = pfn_to_page(vmemmap_section_start(start));
 		nr_pages = 1 << page_order;
 		base_pfn = PHYS_PFN(addr);
 
Signature · 1 line
2.17.2 (Apple Git-113)
#1 lore raw
Quoted 5 lines · Qian Cai

The commit 24b6d4164348 ("mm: pass the vmem_altmap to vmemmap_free") removed a line in vmemmap_free(),

altmap = to_vmem_altmap((unsigned long) section_base);

Quoted 7 lines

but left a variable no longer used.

arch/powerpc/mm/init_64.c: In function 'vmemmap_free':
arch/powerpc/mm/init_64.c:277:16: error: variable 'section_base' set but not used [-Werror=unused-but-set-variable]

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/c38ca265525a00d635219450e8fcc858

cheers