Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp657313ybx; Tue, 5 Nov 2019 03:32:55 -0800 (PST) X-Google-Smtp-Source: APXvYqzhT+eh7gwR+os4HnNoil4WqJFypa+QmjX7K9mXKEVJPJsbQPE2drSVD2AnA4BjH5S73QLi X-Received: by 2002:a50:c408:: with SMTP id v8mr34928267edf.140.1572953575555; Tue, 05 Nov 2019 03:32:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572953575; cv=none; d=google.com; s=arc-20160816; b=aHCSvBqfls5Ph83Oy/JGbkwR+ODJtmEcxmMfdJYBefcM6n+UGwgmQieT1h0jbEqjnY z/SEisIzW5DcEgUR36xzdHp70meqXeYZ6bmTAAdcDBjXSJ5JXUImLxmXwrBulVq+XUm4 n8YUGNWW1Epei1dK8Scwr2Yk7KAKWKPhEibsCZdd44BAAxycR1aduXFcca/rauGR21SV qKVtI91uzFKn0vAVWh9rrtKDG0L4o839dMNd7KuutfT+qnyP/2a/+a14EzYIjDLjBOta dxNIxiP8o6GB4WHKRZhpJX9EOdQRATOEcIjqpka61kqD8PokVH4ZuYI88XxdAZbfnNYU 0pTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:mime-version:user-agent:date:message-id:subject :from:cc:to; bh=u80SJKPaqDnLcU4doYtczY12O7gdTWgLUnxQcRQRW9g=; b=OODkbkYJhmXm8hOWcQBcWBEb7KKLew6/HcGAMpTI54WvsVuD3UMebnBeeYTtciRzk/ hS9mM087+atPoF/7UprHXNvo944jOPIGq5Hv7DVEzhWG4I6MQ5nA8LXbuAokIK8+A8HS c5idQak9fhw9wdS6/K1bOaFT5vONNyYAFBbeG3rXSg1Ba/dS0OVJ/2Rtxii+GWk8Z3JM 1aaSo0zTcIpZG/Hnhmr+G2JzO7qzdQad25KzQWalQrkpL6J6NiJRI0ehZrxRpX/G62Bx oZcvdlPaVFEw0JbZDKob1MIf2awsEjKNOK2amtGI26+HFH8xs+XbavpjPQFiuGP87vdt Il/w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w16si13027328ejj.276.2019.11.05.03.32.32; Tue, 05 Nov 2019 03:32:55 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730882AbfKELbG (ORCPT + 99 others); Tue, 5 Nov 2019 06:31:06 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:39578 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730757AbfKELbF (ORCPT ); Tue, 5 Nov 2019 06:31:05 -0500 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 08A5AD5513D0C2584768; Tue, 5 Nov 2019 19:31:00 +0800 (CST) Received: from [127.0.0.1] (10.177.251.225) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.439.0; Tue, 5 Nov 2019 19:30:52 +0800 To: , CC: , , "hushiyuan@huawei.com" , "linfeilong@huawei.com" From: Yunfeng Ye Subject: [PATCH] ehea: replace with page_shift() in ehea_is_hugepage() Message-ID: Date: Tue, 5 Nov 2019 19:30:45 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.251.225] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/net/ethernet/ibm/ehea/ehea_qmr.c | 5 +---- 1 file changed, 1 insertion(+), 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; -- 2.7.4