From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id DA66321290DE3 for ; Mon, 17 Jun 2019 20:36:11 -0700 (PDT) Date: Tue, 18 Jun 2019 11:35:46 +0800 From: Wei Yang Subject: Re: [PATCH v9 06/12] mm: Kill is_dev_zone() helper Message-ID: <20190618033546.GE18161@richard> References: <155977186863.2443951.9036044808311959913.stgit@dwillia2-desk3.amr.corp.intel.com> <155977191260.2443951.15908146523735681570.stgit@dwillia2-desk3.amr.corp.intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <155977191260.2443951.15908146523735681570.stgit@dwillia2-desk3.amr.corp.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Wei Yang Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" To: Dan Williams Cc: mhocko@suse.com, Pavel Tatashin , linux-nvdimm@lists.01.org, David Hildenbrand , linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, osalvador@suse.de List-ID: On Wed, Jun 05, 2019 at 02:58:32PM -0700, Dan Williams wrote: >Given there are no more usages of is_dev_zone() outside of 'ifdef >CONFIG_ZONE_DEVICE' protection, kill off the compilation helper. > >Cc: Michal Hocko >Cc: Logan Gunthorpe >Acked-by: David Hildenbrand >Reviewed-by: Oscar Salvador >Reviewed-by: Pavel Tatashin >Signed-off-by: Dan Williams Reviewed-by: Wei Yang >--- > include/linux/mmzone.h | 12 ------------ > mm/page_alloc.c | 2 +- > 2 files changed, 1 insertion(+), 13 deletions(-) > >diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h >index 6dd52d544857..49e7fb452dfd 100644 >--- a/include/linux/mmzone.h >+++ b/include/linux/mmzone.h >@@ -855,18 +855,6 @@ static inline int local_memory_node(int node_id) { return node_id; }; > */ > #define zone_idx(zone) ((zone) - (zone)->zone_pgdat->node_zones) > >-#ifdef CONFIG_ZONE_DEVICE >-static inline bool is_dev_zone(const struct zone *zone) >-{ >- return zone_idx(zone) == ZONE_DEVICE; >-} >-#else >-static inline bool is_dev_zone(const struct zone *zone) >-{ >- return false; >-} >-#endif >- > /* > * Returns true if a zone has pages managed by the buddy allocator. > * All the reclaim decisions have to use this function rather than >diff --git a/mm/page_alloc.c b/mm/page_alloc.c >index bd773efe5b82..5dff3f49a372 100644 >--- a/mm/page_alloc.c >+++ b/mm/page_alloc.c >@@ -5865,7 +5865,7 @@ void __ref memmap_init_zone_device(struct zone *zone, > unsigned long start = jiffies; > int nid = pgdat->node_id; > >- if (WARN_ON_ONCE(!pgmap || !is_dev_zone(zone))) >+ if (WARN_ON_ONCE(!pgmap || zone_idx(zone) != ZONE_DEVICE)) > return; > > /* > >_______________________________________________ >Linux-nvdimm mailing list >Linux-nvdimm@lists.01.org >https://lists.01.org/mailman/listinfo/linux-nvdimm -- Wei Yang Help you, Help me _______________________________________________ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm