Skip to content

Commit

Permalink
mm/memblock.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 c8e861a commit f7e2f7e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions mm/memblock.c
Original file line number Diff line number Diff line change
Expand Up @@ -1402,9 +1402,8 @@ int __init_memblock memblock_search_pfn_nid(unsigned long pfn,
if (mid == -1)
return -1;

*start_pfn = type->regions[mid].base >> PAGE_SHIFT;
*end_pfn = (type->regions[mid].base + type->regions[mid].size)
>> PAGE_SHIFT;
*start_pfn = PFN_DOWN(type->regions[mid].base);
*end_pfn = PFN_DOWN(type->regions[mid].base + type->regions[mid].size);

return type->regions[mid].nid;
}
Expand Down

0 comments on commit f7e2f7e

Please sign in to comment.