mm/page_alloc.c: extract the common part in pfn_to_bitidx()
authorWei Yang <richard.weiyang@linux.alibaba.com>
Fri, 7 Aug 2020 06:25:44 +0000 (23:25 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 7 Aug 2020 18:33:29 +0000 (11:33 -0700)
commit399b795b7a80bf703aae56fa0b66fd1949ca1fd9
treef74f6ecb60872f96763ca59324c3f074ed0d0531
parentd38ac97f8a7c4519ba141bbd7c2f7a8da8c9ff8d
mm/page_alloc.c: extract the common part in pfn_to_bitidx()

The return value calculation is the same both for SPARSEMEM or not.

Just take it out.

Signed-off-by: Wei Yang <richard.weiyang@linux.alibaba.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Mel Gorman <mgorman@suse.de>
Link: http://lkml.kernel.org/r/20200623124201.8199-2-richard.weiyang@linux.alibaba.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/page_alloc.c