Skip to contentSkip to conversation

x86: mm: remove unused variable

PATCH In review Arnd Bergmann 3 participants 3 messages Dec 10, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: mm: remove unused variable

A recent change dropped the only user of the variable, which should now be removed as well to avoid this warning:

arch/x86/mm/init_32.c: In function 'arch_remove_memory':
arch/x86/mm/init_32.c:867:15: error: unused variable 'zone' [-Werror=unused-variable]

Fixes dd99d07f818b ("mm, memory_hotplug: move zone/pages handling to offline stage")
---
 arch/x86/mm/init_32.c | 1 -
 1 file changed, 1 deletion(-)
arch/x86/mm/init_32.c +0 -1
index 0b8c7b0033d2..c75c26497c4f 100644
@@ -864,7 +864,6 @@ int arch_remove_memory(int nid, u64 start, u64 size, struct vmem_altmap *altmap)
 {
 	unsigned long start_pfn = start >> PAGE_SHIFT;
 	unsigned long nr_pages = size >> PAGE_SHIFT;
-	struct zone *zone;
 
 	return remove_sections(nid, start_pfn, nr_pages, altmap);
 }
Signature · 1 line
2.20.0
Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Arnd Bergmann

A recent change dropped the only user of the variable, which should now be removed as well to avoid this warning:

arch/x86/mm/init_32.c: In function 'arch_remove_memory':
arch/x86/mm/init_32.c:867:15: error: unused variable 'zone' [-Werror=unused-variable]

Fixes dd99d07f818b ("mm, memory_hotplug: move zone/pages handling to offline stage")
#2 lore raw
In reply to Arnd Bergmann

Hi Arnd,

Quoted 18 lines · On Mon, 10 Dec 2018 21:53:02 +0100 Arnd Bergmann <[email protected]> wrote:

A recent change dropped the only user of the variable, which should now be removed as well to avoid this warning:

arch/x86/mm/init_32.c: In function 'arch_remove_memory':
arch/x86/mm/init_32.c:867:15: error: unused variable 'zone' [-Werror=unused-variable]

Fixes dd99d07f818b ("mm, memory_hotplug: move zone/pages handling to offline stage")
---
 arch/x86/mm/init_32.c | 1 -
 1 file changed, 1 deletion(-)
arch/x86/mm/init_32.c +0 -0
index 0b8c7b0033d2..c75c26497c4f 100644

arch/x86/mm/init_32.c int arch_remove_memory(int nid, u64 start, u64 size, struct vmem_altmap *altmap) · line 869

Quoted 7 lines
arch/x86/mm/init_32.c +0 -1
@@ -864,7 +864,6 @@ int arch_remove_memory(int nid, u64 start, u64 size, struct vmem_altmap *altmap)
 {
 	unsigned long start_pfn = start >> PAGE_SHIFT;
 	unsigned long nr_pages = size >> PAGE_SHIFT;
-	struct zone *zone;
 
 	return remove_sections(nid, start_pfn, nr_pages, altmap);
 }

I have added that to the akpm-current tree for today.

Signature · 2 lines
Cheers,
Stephen Rothwell