Commit 9439bb0f authored by Yunfeng Ye's avatar Yunfeng Ye Committed by David S. Miller

ehea: replace with page_shift() in ehea_is_hugepage()

The function page_shift() is supported after the commit 94ad9338
("mm: introduce page_shift()").

So replace with page_shift() in ehea_is_hugepage() for readability.
Signed-off-by: default avatarYunfeng Ye <yeyunfeng@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5d8876e2
...@@ -670,13 +670,10 @@ int ehea_rem_sect_bmap(unsigned long pfn, unsigned long nr_pages) ...@@ -670,13 +670,10 @@ int ehea_rem_sect_bmap(unsigned long pfn, unsigned long nr_pages)
static int ehea_is_hugepage(unsigned long pfn) static int ehea_is_hugepage(unsigned long pfn)
{ {
int page_order;
if (pfn & EHEA_HUGEPAGE_PFN_MASK) if (pfn & EHEA_HUGEPAGE_PFN_MASK)
return 0; return 0;
page_order = compound_order(pfn_to_page(pfn)); if (page_shift(pfn_to_page(pfn)) != EHEA_HUGEPAGESHIFT)
if (page_order + PAGE_SHIFT != EHEA_HUGEPAGESHIFT)
return 0; return 0;
return 1; return 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment