mm/memory_hotplug.c: use PFN_DOWN()
authorFabian Frederick <fabf@skynet.be>
Wed, 4 Jun 2014 23:07:51 +0000 (16:07 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 4 Jun 2014 23:54:02 +0000 (16:54 -0700)
Replace ((x) >> PAGE_SHIFT) with the pfn macro.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memory_hotplug.c

index 2906873a150233ce0fbcf4532b6fc7c7a8b9c72b..cbb7ca0ac44ba2780500c0e5582bde3c5ed54c03 100644 (file)
@@ -1069,7 +1069,7 @@ static pg_data_t __ref *hotadd_new_pgdat(int nid, u64 start)
        struct pglist_data *pgdat;
        unsigned long zones_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);
        if (!pgdat) {
@@ -1141,7 +1141,7 @@ out:
 
 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;
 
        /* Memory range must be aligned with section */