lkml.org 
[lkml]   [2015]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] memory-hotplug: use PFN_DOWN in should_add_memory_movable
Date
Use PFN_DOWN() in should_add_memory_movable() to keep the consistency
of this file.

Signed-off-by: Geliang Tang <geliangtang@163.com>
---
mm/memory_hotplug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index 67d488a..7c44ff7 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -1205,7 +1205,7 @@ static int check_hotplug_memory_range(u64 start, u64 size)
*/
static int should_add_memory_movable(int nid, u64 start, u64 size)
{
- unsigned long start_pfn = start >> PAGE_SHIFT;
+ unsigned long start_pfn = PFN_DOWN(start);
pg_data_t *pgdat = NODE_DATA(nid);
struct zone *movable_zone = pgdat->node_zones + ZONE_MOVABLE;

--
2.5.0



\
 
 \ /
  Last update: 2015-11-18 15:01    [W:0.035 / U:5.324 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site