]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] remove weird pmd cast
authorDave Hansen <haveblue@us.ibm.com>
Wed, 20 Oct 2004 01:38:41 +0000 (18:38 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Wed, 20 Oct 2004 01:38:41 +0000 (18:38 -0700)
I don't know what this is trying to do.  It might be some kind of artifact
from when get_pgd_slow() was removed.

The expanded expression with __pa() ends up looking something like this:

(unsigned long)(u64)(u32)pmd-PAGE_OFFSET

and that is just nutty because pmd is a pointer now, anyway.

Attached patch removes the casts.

Signed-off-by: Dave Hansen <haveblue@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/i386/mm/pgtable.c

index 1152545ef8ad5ab0e5ffde61a2163d6721a7001e..0cac3b6bf6d743148696a41e47c7c5c4025db4aa 100644 (file)
@@ -233,7 +233,7 @@ pgd_t *pgd_alloc(struct mm_struct *mm)
                pmd_t *pmd = kmem_cache_alloc(pmd_cache, GFP_KERNEL);
                if (!pmd)
                        goto out_oom;
-               set_pgd(&pgd[i], __pgd(1 + __pa((u64)((u32)pmd))));
+               set_pgd(&pgd[i], __pgd(1 + __pa(pmd)));
        }
        return pgd;