From nobody Sun May 10 19:14:40 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 19CB5C433EF for ; Tue, 26 Apr 2022 07:13:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343733AbiDZHQW (ORCPT ); Tue, 26 Apr 2022 03:16:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34980 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241770AbiDZHQV (ORCPT ); Tue, 26 Apr 2022 03:16:21 -0400 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F13A039812 for ; Tue, 26 Apr 2022 00:13:13 -0700 (PDT) Received: from dggpemm500022.china.huawei.com (unknown [172.30.72.54]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4KnXzX45Q5zCsR4; Tue, 26 Apr 2022 15:08:40 +0800 (CST) Received: from linux-suspe12sp5.huawei.com (10.67.133.42) by dggpemm500022.china.huawei.com (7.185.36.162) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 26 Apr 2022 15:13:11 +0800 From: liusongtang To: , CC: , , , , , , Subject: [PATCH v2] mm/memory_hotplug: use pgprot_val to get value of pgprot Date: Tue, 26 Apr 2022 15:13:02 +0800 Message-ID: <20220426071302.220646-1-liusongtang@huawei.com> X-Mailer: git-send-email 2.12.3 MIME-Version: 1.0 X-Originating-IP: [10.67.133.42] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpemm500022.china.huawei.com (7.185.36.162) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" pgprot.pgprot is a non-portable code, it should be replaced by portable macro pgprot_val. Signed-off-by: liusongtang Reviewed-by: Anshuman Khandual --- v2: add 'memory_hotplug' in the subject line v1: https://lore.kernel.org/all/a5b58a66-bdc3-94df-6af5-c647da888c17@huawei= .com/ --- mm/memory_hotplug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 416b38c..bf7d181 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -303,7 +303,7 @@ int __ref __add_pages(int nid, unsigned long pfn, unsig= ned long nr_pages, int err; struct vmem_altmap *altmap =3D params->altmap; =20 - if (WARN_ON_ONCE(!params->pgprot.pgprot)) + if (WARN_ON_ONCE(!pgprot_val(params->pgprot))) return -EINVAL; =20 VM_BUG_ON(!mhp_range_allowed(PFN_PHYS(pfn), nr_pages * PAGE_SIZE, false)); --=20 2.12.3