Skip to contentSkip to conversation

mm/cleanup: use pfn_to_nid() instead of page_to_nid(pfn_to_page())

PATCH In review Xishi Qiu 2 participants 2 messages Sep 9, 2013

Subsystems (2)
lore
Share & tools
lore

Xishi Qiu

author
#0 lore raw

PATCH 2/2 mm/cleanup: use pfn_to_nid() instead of page_to_nid(pfn_to_page())

Use "pfn_to_nid(pfn)" instead of "page_to_nid(pfn_to_page(pfn))".

---
 mm/memory_hotplug.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
mm/memory_hotplug.c +1 -1
index 85f80b7..a95dd28 100644
@@ -937,7 +937,7 @@ int __ref online_pages(unsigned long pfn, unsigned long nr_pages, int online_typ
 	arg.nr_pages = nr_pages;
 	node_states_check_changes_online(nr_pages, zone, &arg);
 
-	nid = page_to_nid(pfn_to_page(pfn));
+	nid = pfn_to_nid(pfn);
 
 	ret = memory_notify(MEM_GOING_ONLINE, &arg);
 	ret = notifier_to_errno(ret);
Signature · 1 line
1.7.1
Acked-by on v1 2/2
#1 lore raw

[CCing Kosaki since he maintains mm/memory_hotplug.c]

Quoted 5 lines · Xishi Qiu

Use "pfn_to_nid(pfn)" instead of "page_to_nid(pfn_to_page(pfn))".

---

Thanks,
Yasuaki Ishimatsu

Quoted 9 lines
  mm/memory_hotplug.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
mm/memory_hotplug.c +0 -0
index 85f80b7..a95dd28 100644

mm/memory_hotplug.c int __ref online_pages(unsigned long pfn, unsigned long nr_pages, int online_typ · line 943

Quoted 8 lines
mm/memory_hotplug.c +1 -1
@@ -937,7 +937,7 @@ int __ref online_pages(unsigned long pfn, unsigned long nr_pages, int online_typ
  	arg.nr_pages = nr_pages;
  	node_states_check_changes_online(nr_pages, zone, &arg);
 
-	nid = page_to_nid(pfn_to_page(pfn));
+	nid = pfn_to_nid(pfn);
 
  	ret = memory_notify(MEM_GOING_ONLINE, &arg);
  	ret = notifier_to_errno(ret);

--
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>