Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757215AbcJXEnG (ORCPT ); Mon, 24 Oct 2016 00:43:06 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:60070 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1757107AbcJXEm4 (ORCPT ); Mon, 24 Oct 2016 00:42:56 -0400 From: Anshuman Khandual To: linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: mhocko@suse.com, js1304@gmail.com, vbabka@suse.cz, mgorman@suse.de, minchan@kernel.org, akpm@linux-foundation.org, aneesh.kumar@linux.vnet.ibm.com, bsingharora@gmail.com Subject: [DEBUG 06/10] mm: Export definition of 'zone_names' array through mmzone.h Date: Mon, 24 Oct 2016 10:12:25 +0530 X-Mailer: git-send-email 2.1.0 In-Reply-To: <1477284149-2976-1-git-send-email-khandual@linux.vnet.ibm.com> References: <1477283517-2504-1-git-send-email-khandual@linux.vnet.ibm.com> <1477284149-2976-1-git-send-email-khandual@linux.vnet.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16102404-0016-0000-0000-000001E23F7D X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16102404-0017-0000-0000-000005B11E08 Message-Id: <1477284149-2976-7-git-send-email-khandual@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-10-23_18:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609300000 definitions=main-1610240083 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1020 Lines: 37 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 --- 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 821dffb..560bbcd 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 a2536b4..35c6d2a 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -212,7 +212,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