ARM: make_coherent: convert adjust_pte() to use p*d_none_or_clear_bad()
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
@@ -73,16 +73,12 @@ static int adjust_pte(struct vm_area_struct *vma, unsigned long address)
|
|||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
pgd = pgd_offset(vma->vm_mm, address);
|
pgd = pgd_offset(vma->vm_mm, address);
|
||||||
if (pgd_none(*pgd))
|
if (pgd_none_or_clear_bad(pgd))
|
||||||
goto no_pgd;
|
return 0;
|
||||||
if (pgd_bad(*pgd))
|
|
||||||
goto bad_pgd;
|
|
||||||
|
|
||||||
pmd = pmd_offset(pgd, address);
|
pmd = pmd_offset(pgd, address);
|
||||||
if (pmd_none(*pmd))
|
if (pmd_none_or_clear_bad(pmd))
|
||||||
goto no_pmd;
|
return 0;
|
||||||
if (pmd_bad(*pmd))
|
|
||||||
goto bad_pmd;
|
|
||||||
|
|
||||||
pte = pte_offset_map(pmd, address);
|
pte = pte_offset_map(pmd, address);
|
||||||
|
|
||||||
@@ -91,18 +87,6 @@ static int adjust_pte(struct vm_area_struct *vma, unsigned long address)
|
|||||||
pte_unmap(pte);
|
pte_unmap(pte);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
bad_pgd:
|
|
||||||
pgd_ERROR(*pgd);
|
|
||||||
pgd_clear(pgd);
|
|
||||||
no_pgd:
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
bad_pmd:
|
|
||||||
pmd_ERROR(*pmd);
|
|
||||||
pmd_clear(pmd);
|
|
||||||
no_pmd:
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Reference in New Issue
Block a user