[patch] remove weird pmd cast

From: Dave Hansen
Date: Thu Oct 07 2004 - 12:46:32 EST



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@xxxxxxxxxx>
---

memhotplug-dave/arch/i386/mm/pgtable.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)

diff -puN arch/i386/mm/pgtable.c~A3-remove-weird-pmd-casts-i386 arch/i386/mm/pgtable.c
--- memhotplug/arch/i386/mm/pgtable.c~A3-remove-weird-pmd-casts-i386 2004-10-07 09:34:26.000000000 -0700
+++ memhotplug-dave/arch/i386/mm/pgtable.c 2004-10-07 09:34:26.000000000 -0700
@@ -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;

_
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/