Commit c8e861a5 authored by Fabian Frederick's avatar Fabian Frederick Committed by Linus Torvalds

mm/memory_hotplug.c: use PFN_DOWN()

Replace ((x) >> PAGE_SHIFT) with the pfn macro.
Signed-off-by: default avatarFabian Frederick <fabf@skynet.be>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 96f8d8e0
...@@ -1069,7 +1069,7 @@ static pg_data_t __ref *hotadd_new_pgdat(int nid, u64 start) ...@@ -1069,7 +1069,7 @@ static pg_data_t __ref *hotadd_new_pgdat(int nid, u64 start)
struct pglist_data *pgdat; struct pglist_data *pgdat;
unsigned long zones_size[MAX_NR_ZONES] = {0}; unsigned long zones_size[MAX_NR_ZONES] = {0};
unsigned long zholes_size[MAX_NR_ZONES] = {0}; unsigned long zholes_size[MAX_NR_ZONES] = {0};
unsigned long start_pfn = start >> PAGE_SHIFT; unsigned long start_pfn = PFN_DOWN(start);
pgdat = NODE_DATA(nid); pgdat = NODE_DATA(nid);
if (!pgdat) { if (!pgdat) {
...@@ -1141,7 +1141,7 @@ int try_online_node(int nid) ...@@ -1141,7 +1141,7 @@ int try_online_node(int nid)
static int check_hotplug_memory_range(u64 start, u64 size) static int check_hotplug_memory_range(u64 start, u64 size)
{ {
u64 start_pfn = start >> PAGE_SHIFT; u64 start_pfn = PFN_DOWN(start);
u64 nr_pages = size >> PAGE_SHIFT; u64 nr_pages = size >> PAGE_SHIFT;
/* Memory range must be aligned with section */ /* Memory range must be aligned with section */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment