summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/ibm/ehea
diff options
context:
space:
mode:
authorYunfeng Ye <yeyunfeng@huawei.com>2019-11-05 14:30:45 +0300
committerDavid S. Miller <davem@davemloft.net>2019-11-06 21:23:35 +0300
commit9439bb0f3656003308a479a9a785ec2e79cfeb39 (patch)
tree7085dcebb6d77bd27388f112a83354107eb053ea /drivers/net/ethernet/ibm/ehea
parent5d8876e2c2517e8f0b035f5566b1775f99d785ea (diff)
downloadlinux-9439bb0f3656003308a479a9a785ec2e79cfeb39.tar.xz
ehea: replace with page_shift() in ehea_is_hugepage()
The function page_shift() is supported after the commit 94ad9338109f ("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>
Diffstat (limited to 'drivers/net/ethernet/ibm/ehea')
-rw-r--r--drivers/net/ethernet/ibm/ehea/ehea_qmr.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/ethernet/ibm/ehea/ehea_qmr.c b/drivers/net/ethernet/ibm/ehea/ehea_qmr.c
index 6e70658d50c4..db45373ea31c 100644
--- a/drivers/net/ethernet/ibm/ehea/ehea_qmr.c
+++ b/drivers/net/ethernet/ibm/ehea/ehea_qmr.c
@@ -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;