memblock: fix parameter order in memblock_phys_alloc_try_nid()
authorMike Rapoport <rppt@linux.ibm.com>
Thu, 7 Feb 2019 00:58:34 +0000 (11:58 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 8 Feb 2019 09:30:54 +0000 (20:30 +1100)
The refactoring of internal memblock allocation functions used wrong order
of parameters in memblock_alloc_range_nid() call from
memblock_phys_alloc_try_nid().  Fix it.

Link: http://lkml.kernel.org/r/20190203113915.GC8620@rapoport-lnx
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Reported-by: Michael Ellerman <mpe@ellerman.id.au>
Tested-by: Michael Ellerman <mpe@ellerman.id.au>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
mm/memblock.c

index e4468b9..509bfd2 100644 (file)
@@ -1402,8 +1402,8 @@ phys_addr_t __init memblock_phys_alloc_range(phys_addr_t size,
 
 phys_addr_t __init memblock_phys_alloc_try_nid(phys_addr_t size, phys_addr_t align, int nid)
 {
-       return memblock_alloc_range_nid(size, align, 0, nid,
-                                       MEMBLOCK_ALLOC_ACCESSIBLE);
+       return memblock_alloc_range_nid(size, align, 0,
+                                       MEMBLOCK_ALLOC_ACCESSIBLE, nid);
 }
 
 /**