diff options
author | Fabian Frederick <fabf@skynet.be> | 2014-06-05 01:07:51 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-05 01:54:02 +0200 |
commit | c8e861a531b0199dc6ef9e402e29c474dfa507ce (patch) | |
tree | 28b59f3f8dd64f18e4a04da1d037521fd80ce0fd /mm/memory_hotplug.c | |
parent | brd: return -ENOSPC rather than -ENOMEM on page allocation failure (diff) | |
download | linux-c8e861a531b0199dc6ef9e402e29c474dfa507ce.tar.xz linux-c8e861a531b0199dc6ef9e402e29c474dfa507ce.zip |
mm/memory_hotplug.c: use PFN_DOWN()
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>
Diffstat (limited to 'mm/memory_hotplug.c')
-rw-r--r-- | mm/memory_hotplug.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 2906873a1502..cbb7ca0ac44b 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -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 */ |