mm: Remove redundant return in set_huge_zero_folio()
Subsystems (2)
Dev Jain
reviewerPATCH 1/1 mm: Remove redundant return in set_huge_zero_folio()
It is the responsibility of the caller to check pmd_none(); in any case, we are not achieving anything by returning since there is no return value to tell the caller that we succeeded or not. So remove this check.
Signed-off-by Dev Jain <[email protected]>
--- mm/huge_memory.c | 2 -- 1 file changed, 2 deletions(-)
mm/huge_memory.c +0 -2
@@ -1309,8 +1309,6 @@ static void set_huge_zero_folio(pgtable_t pgtable, struct mm_struct *mm, struct folio *zero_folio) {pmd_t entry; -if (!pmd_none (*pmd)) -return ; entry =mk_pmd (&zero_folio->page, vma->vm_page_prot); entry =pmd_mkhuge (entry);pgtable_trans_huge_deposit (mm, pmd, pgtable);
Signature · 1 line
2.30.2
Quoted 14 lines · Dev Jain
It is the responsibility of the caller to check
pmd_none(); in any case, we are not achieving anything by returning since there is no return value to tell the caller that we succeeded or not. So remove this check.Signed-off-by Dev Jain <[email protected]>--- mm/huge_memory.c | 2 -- 1 file changed, 2 deletions(-)mm/huge_memory.c +0
-0
mm/huge_memory.c static void set_huge_zero_folio(pgtable_t pgtable, struct mm_struct *mm, · line 1314
Quoted 8 lines
mm/huge_memory.c +0
-2@@ -1309,8 +1309,6 @@ static void set_huge_zero_folio(pgtable_t pgtable, struct mm_struct *mm, struct folio *zero_folio) {pmd_t entry; -if (!pmd_none (*pmd)) -return ; entry =mk_pmd (&zero_folio->page, vma->vm_page_prot); entry =pmd_mkhuge (entry);pgtable_trans_huge_deposit (mm, pmd, pgtable);
Reviewed-by David Hildenbrand <[email protected]>
Signature · 3 lines
Cheers, David / dhildenb