memblock: split checks whether a region should be skipped to a helper function
authorMike Rapoport <rppt@linux.ibm.com>
Thu, 7 Feb 2019 00:58:41 +0000 (11:58 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 8 Feb 2019 09:30:56 +0000 (20:30 +1100)
commita82b43233f799628e7405f1e9143c89758a40789
treef09abee834bea94b94ae78aa2624b5dcd65331f8
parentaee6f7042da1d1b7c6059f7dd2fed29fee371478
memblock: split checks whether a region should be skipped to a helper function

__next_mem_range() and __next_mem_range_rev() duplicate the code that
checks whether a region should be skipped because of node or flags
incompatibility.

Split this code into a helper function.

Link: http://lkml.kernel.org/r/1549455025-17706-3-git-send-email-rppt@linux.ibm.com
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Michal Hocko <mhocko@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
mm/memblock.c