Skip to content

Commit c8e861a

Browse files
Fabian Fredericktorvalds
authored andcommitted
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>
1 parent 96f8d8e commit c8e861a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎mm/memory_hotplug.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1069,7 +1069,7 @@ static pg_data_t __ref *hotadd_new_pgdat(int nid, u64 start)
10691069
struct pglist_data *pgdat;
10701070
unsigned long zones_size[MAX_NR_ZONES] = {0};
10711071
unsigned long zholes_size[MAX_NR_ZONES] = {0};
1072-
unsigned long start_pfn = start >> PAGE_SHIFT;
1072+
unsigned long start_pfn = PFN_DOWN(start);
10731073

10741074
pgdat = NODE_DATA(nid);
10751075
if (!pgdat) {
@@ -1141,7 +1141,7 @@ int try_online_node(int nid)
11411141

11421142
static int check_hotplug_memory_range(u64 start, u64 size)
11431143
{
1144-
u64 start_pfn = start >> PAGE_SHIFT;
1144+
u64 start_pfn = PFN_DOWN(start);
11451145
u64 nr_pages = size >> PAGE_SHIFT;
11461146

11471147
/* Memory range must be aligned with section */

0 commit comments

Comments
 (0)