Commit cdf8d758 authored by James Hogan's avatar James Hogan

metag: dma: remove dead code in dma_alloc_init()

Meta has 2 levels of page table so the pmd folds into the pud which
folds into the pgd. Therefore the !pmd check in dma_alloc_init() is dead
code since it essentially checks whether:
  (init_mm->pgd + 0x770) == 0

Remove the check.
Reported-by: default avatarChen Gang <gang.chen@asianux.com>
Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
parent 6ce4eac1
...@@ -399,11 +399,6 @@ static int __init dma_alloc_init(void) ...@@ -399,11 +399,6 @@ static int __init dma_alloc_init(void)
pgd = pgd_offset(&init_mm, CONSISTENT_START); pgd = pgd_offset(&init_mm, CONSISTENT_START);
pud = pud_alloc(&init_mm, pgd, CONSISTENT_START); pud = pud_alloc(&init_mm, pgd, CONSISTENT_START);
pmd = pmd_alloc(&init_mm, pud, CONSISTENT_START); pmd = pmd_alloc(&init_mm, pud, CONSISTENT_START);
if (!pmd) {
pr_err("%s: no pmd tables\n", __func__);
ret = -ENOMEM;
break;
}
WARN_ON(!pmd_none(*pmd)); WARN_ON(!pmd_none(*pmd));
pte = pte_alloc_kernel(pmd, CONSISTENT_START); pte = pte_alloc_kernel(pmd, CONSISTENT_START);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment