Skip to content

Commit

Permalink
mm/memory_hotplug.c: use PFN_DOWN()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Fabian Frederick authored and Linus Torvalds committed Jun 4, 2014
1 parent 96f8d8e commit c8e861a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mm/memory_hotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -1141,7 +1141,7 @@ int try_online_node(int nid)

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 */
Expand Down

0 comments on commit c8e861a

Please sign in to comment.