Re: [PATCH -next 3/3] mm/debug_vm_pgtable: Remove useless pfn_pmd()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux