diff mbox series

x86: mm: remove unused variable

Message ID 20181210205309.2794444-1-arnd@arndb.de
State New
Headers show
Series x86: mm: remove unused variable | expand

Commit Message

Arnd Bergmann Dec. 10, 2018, 8:53 p.m. UTC
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")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

---
 arch/x86/mm/init_32.c | 1 -
 1 file changed, 1 deletion(-)

-- 
2.20.0

Comments

Thomas Gleixner Dec. 10, 2018, 9:28 p.m. UTC | #1
On Mon, 10 Dec 2018, Arnd Bergmann 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")

> Signed-off-by: Arnd Bergmann <arnd@arndb.de>


Acked-by: Thomas Gleixner <tglx@linutronix.de>
Stephen Rothwell Dec. 10, 2018, 10:02 p.m. UTC | #2
Hi Arnd,

On Mon, 10 Dec 2018 21:53:02 +0100 Arnd Bergmann <arnd@arndb.de> 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")

> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

> ---

>  arch/x86/mm/init_32.c | 1 -

>  1 file changed, 1 deletion(-)

> 

> diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c

> index 0b8c7b0033d2..c75c26497c4f 100644

> --- a/arch/x86/mm/init_32.c

> +++ b/arch/x86/mm/init_32.c

> @@ -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.

-- 
Cheers,
Stephen Rothwell
diff mbox series

Patch

diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c
index 0b8c7b0033d2..c75c26497c4f 100644
--- a/arch/x86/mm/init_32.c
+++ b/arch/x86/mm/init_32.c
@@ -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);
 }