diff options
author | liusongtang <liusongtang@huawei.com> | 2022-05-09 18:20:52 -0700 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2022-05-13 07:20:07 -0700 |
commit | 6366238b8dfc383723c211c1ffe8c8d7914107e5 (patch) | |
tree | 4adf3337c0482ceba873e8de9f887249995a476a /mm/memory_hotplug.c | |
parent | 915418088c977993933efaf7a704c0bcd6c2bf77 (diff) | |
download | linux-next-6366238b8dfc383723c211c1ffe8c8d7914107e5.tar.gz |
mm/memory_hotplug: use pgprot_val to get value of pgprot
pgprot.pgprot is non-portable code. It should be replaced by portable
macro pgprot_val.
Link: https://lkml.kernel.org/r/20220426071302.220646-1-liusongtang@huawei.com
Signed-off-by: liusongtang <liusongtang@huawei.com>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: Xiaoming Ni <nixiaoming@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/memory_hotplug.c')
-rw-r--r-- | mm/memory_hotplug.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 19a6beb9d4b6..e99fd60548f5 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -303,7 +303,7 @@ int __ref __add_pages(int nid, unsigned long pfn, unsigned long nr_pages, int err; struct vmem_altmap *altmap = params->altmap; - if (WARN_ON_ONCE(!params->pgprot.pgprot)) + if (WARN_ON_ONCE(!pgprot_val(params->pgprot))) return -EINVAL; VM_BUG_ON(!mhp_range_allowed(PFN_PHYS(pfn), nr_pages * PAGE_SIZE, false)); |