Skip to content

Commit

Permalink
ehea: replace with page_shift() in ehea_is_hugepage()
Browse files Browse the repository at this point in the history
The function page_shift() is supported after the commit 94ad933
("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>
  • Loading branch information
Yunfeng Ye authored and David S. Miller committed Nov 6, 2019
1 parent 5d8876e commit 9439bb0
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/net/ethernet/ibm/ehea/ehea_qmr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9439bb0

Please sign in to comment.