mm/memory_hotplug: use pgprot_val to get value of pgprot
Bugzilla: https://bugzilla.redhat.com/2160210 commit 6366238b8dfc383723c211c1ffe8c8d7914107e5 Author: liusongtang <liusongtang@huawei.com> Date: Mon May 9 18:20:52 2022 -0700 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> Signed-off-by: Chris von Recklinghausen <crecklin@redhat.com>
This commit is contained in:
parent
14a71baf3c
commit
c434979693
|
@ -320,7 +320,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));
|
||||
|
|
Loading…
Reference in New Issue