
Instead of casting the void*'s into "unsigned long"s to pass into the pagetable
functions: p{gd,md,te}_index(), do a cast inside the macro.  All of the current
callers should be "unsigned long"s already, so this should have no other
effect than making it valid to pass a void* to those functions, which seems
pretty sane since their arguments are called "address".  

Signed-off-by: Dave Hansen <haveblue@us.ibm.com>
---

 memhotplug-dave/include/asm-i386/pgtable.h |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff -puN include/asm-i386/pgtable.h~A4-index-functions-take-voidstar include/asm-i386/pgtable.h
--- memhotplug/include/asm-i386/pgtable.h~A4-index-functions-take-voidstar	2005-01-04 13:49:26.000000000 -0800
+++ memhotplug-dave/include/asm-i386/pgtable.h	2005-01-04 13:49:26.000000000 -0800
@@ -302,7 +302,8 @@ static inline pte_t pte_modify(pte_t pte
  * this macro returns the index of the entry in the pgd page which would
  * control the given virtual address
  */
-#define pgd_index(address) (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD-1))
+#define pgd_index(address) \
+	(((unsigned long)(address) >> PGDIR_SHIFT) & (PTRS_PER_PGD-1))
 #define pgd_index_k(addr) pgd_index(addr)
 
 /*
@@ -324,7 +325,7 @@ static inline pte_t pte_modify(pte_t pte
  * control the given virtual address
  */
 #define pmd_index(address) \
-		(((address) >> PMD_SHIFT) & (PTRS_PER_PMD-1))
+		(((unsigned long)(address) >> PMD_SHIFT) & (PTRS_PER_PMD-1))
 
 /*
  * the pte page can be thought of an array like this: pte_t[PTRS_PER_PTE]
@@ -333,7 +334,7 @@ static inline pte_t pte_modify(pte_t pte
  * control the given virtual address
  */
 #define pte_index(address) \
-		(((address) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
+		(((unsigned long)(address) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
 #define pte_offset_kernel(dir, address) \
 	((pte_t *) pmd_page_kernel(*(dir)) +  pte_index(address))
 
_
