[15/16] libnvdimm/e820: Drop the wrapper around memory_add_physaddr_to_nid
diff mbox series

Message ID 157309907810.1582359.7981833298864911876.stgit@dwillia2-desk3.amr.corp.intel.com
State Superseded
Headers show
Series
  • Memory Hierarchy: Enable target node lookups for reserved memory
Related show

Commit Message

Dan Williams Nov. 7, 2019, 3:57 a.m. UTC
The definition of memory_add_physaddr_to_nid() already has a dummy
fallback, no need to duplicate this in the e820 driver.

Cc: Ira Weiny <ira.weiny@intel.com>
Cc: Vishal Verma <vishal.l.verma@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
 drivers/nvdimm/e820.c |   14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

Patch
diff mbox series

diff --git a/drivers/nvdimm/e820.c b/drivers/nvdimm/e820.c
index e02f60ad6c99..b802291bcde1 100644
--- a/drivers/nvdimm/e820.c
+++ b/drivers/nvdimm/e820.c
@@ -16,18 +16,6 @@  static int e820_pmem_remove(struct platform_device *pdev)
 	return 0;
 }
 
-#ifdef CONFIG_MEMORY_HOTPLUG
-static int e820_range_to_nid(resource_size_t addr)
-{
-	return memory_add_physaddr_to_nid(addr);
-}
-#else
-static int e820_range_to_nid(resource_size_t addr)
-{
-	return NUMA_NO_NODE;
-}
-#endif
-
 static int e820_register_one(struct resource *res, void *data)
 {
 	struct nd_region_desc ndr_desc;
@@ -35,7 +23,7 @@  static int e820_register_one(struct resource *res, void *data)
 
 	memset(&ndr_desc, 0, sizeof(ndr_desc));
 	ndr_desc.res = res;
-	ndr_desc.numa_node = e820_range_to_nid(res->start);
+	ndr_desc.numa_node = memory_add_physaddr_to_nid(res->start);
 	ndr_desc.target_node = ndr_desc.numa_node;
 	set_bit(ND_REGION_PAGEMAP, &ndr_desc.flags);
 	if (!nvdimm_pmem_region_create(nvdimm_bus, &ndr_desc))