ehea: replace with page_shift() in ehea_is_hugepage()
authorYunfeng Ye <yeyunfeng@huawei.com>
Tue, 5 Nov 2019 11:30:45 +0000 (19:30 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 6 Nov 2019 18:23:35 +0000 (10:23 -0800)
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>
drivers/net/ethernet/ibm/ehea/ehea_qmr.c

index 6e70658d50c4db2006b0e09770b9f5cc916d694f..db45373ea31c891a9beaae00b1a5239148f25f79 100644 (file)
@@ -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;