lkml.org 
[lkml]   [2016]   [Sep]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH V2 1/2] mm: Export definition of 'zone_names' array through mmzone.h
Date
zone_names[] is used to identify any zone given it's index which
can be used in many other places. So exporting the definition
through include/linux/mmzone.h header for it's broader access.

Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
---
Changes in V2:
- Removed the static and declared in mmzone.h per Andrew

include/linux/mmzone.h | 1 +
mm/page_alloc.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index 7f2ae99..9943204 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -341,6 +341,7 @@ enum zone_type {

};

+extern char * const zone_names[];
#ifndef __GENERATING_BOUNDS_H

struct zone {
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index a2214c6..cb46bf8 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -207,7 +207,7 @@ int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES-1] = {

EXPORT_SYMBOL(totalram_pages);

-static char * const zone_names[MAX_NR_ZONES] = {
+char * const zone_names[MAX_NR_ZONES] = {
#ifdef CONFIG_ZONE_DMA
"DMA",
#endif
--
2.1.0
\
 
 \ /
  Last update: 2016-09-17 09:58    [W:0.125 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site