On 4/1/21 7:53 AM, Shixin Liu wrote: > The call to pfn_pmd() here is redundant. > > Signed-off-by: Shixin Liu <liushixin2@xxxxxxxxxx> > --- > mm/debug_vm_pgtable.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/mm/debug_vm_pgtable.c b/mm/debug_vm_pgtable.c > index c379bbe42c2a..9f4c4a114229 100644 > --- a/mm/debug_vm_pgtable.c > +++ b/mm/debug_vm_pgtable.c > @@ -196,7 +196,6 @@ static void __init pmd_advanced_tests(struct mm_struct *mm, > > pgtable_trans_huge_deposit(mm, pmdp, pgtable); > > - pmd = pfn_pmd(pfn, prot); > set_pmd_at(mm, vaddr, pmdp, pmd); > pmdp_set_wrprotect(mm, vaddr, pmdp); > pmd = READ_ONCE(*pmdp); > Instead drop the first pfn_pmd(), as that pmd would not be required when THP is not enabled. Also, please fold this with the first patch.