mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-23 04:34:11 +08:00
ehea: replace with page_shift() in ehea_is_hugepage()
The function page_shift() is supported after the commit 94ad933810
("mm: introduce page_shift()").
So replace with page_shift() in ehea_is_hugepage() for readability.
Signed-off-by: Yunfeng Ye <yeyunfeng@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
5d8876e2c2
commit
9439bb0f36
@ -670,13 +670,10 @@ int ehea_rem_sect_bmap(unsigned long pfn, unsigned long nr_pages)
|
||||
|
||||
static int ehea_is_hugepage(unsigned long pfn)
|
||||
{
|
||||
int page_order;
|
||||
|
||||
if (pfn & EHEA_HUGEPAGE_PFN_MASK)
|
||||
return 0;
|
||||
|
||||
page_order = compound_order(pfn_to_page(pfn));
|
||||
if (page_order + PAGE_SHIFT != EHEA_HUGEPAGESHIFT)
|
||||
if (page_shift(pfn_to_page(pfn)) != EHEA_HUGEPAGESHIFT)
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
|
Loading…
Reference in New Issue
Block a user