mm: avoid unused variables in memmap_init_zone
Subsystems (2)
PATCH 1/1 mm: avoid unused variables in memmap_init_zone
A quick fix on mm/page_alloc.c introduced a harmless warning:
mm/page_alloc.c: In function 'memmap_init_zone':mm/page_alloc.c:4617:44: warning: unused variable 'tmp' [-Wunused-variable] mm/page_alloc.c:4617:26: warning: unused variable 'r' [-Wunused-variable]
This uses another #ifdef to avoid declaring the two variables when the code is not built.
---
This was obvious for any builds on yesterday's linux-next, so most likely it has already been submitted and/or fixed. If not, please fold this patch into the one that caused the warning.
mm/page_alloc.c +2 -0
@@ -4614,7 +4614,9 @@ void __meminit memmap_init_zone(unsigned long size, int nid, unsigned long zone,unsigned long pfn;struct zone *z;unsigned long nr_initialised =0 ; +#ifdef CONFIG_HAVE_MEMBLOCK_NODE_MAP struct memblock_region *r =NULL , *tmp; +#endif if (highest_memmap_pfn < end_pfn -1 ) highest_memmap_pfn = end_pfn -1 ;
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>