
From: Andi Kleen <ak@muc.de>

As suggsted by Hugh Dickins. 

Avoid unnecessary cast in pml4_populate for the 3level fallback case.

Use one do {} while (0) more. 

Signed-off-by: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/include/asm-generic/nopml4-pgalloc.h |    2 +-
 25-akpm/include/asm-generic/nopml4-pgtable.h |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff -puN include/asm-generic/nopml4-pgalloc.h~4level-make-3level-fallback-more-type-safe include/asm-generic/nopml4-pgalloc.h
--- 25/include/asm-generic/nopml4-pgalloc.h~4level-make-3level-fallback-more-type-safe	2004-11-07 16:36:21.082149216 -0800
+++ 25-akpm/include/asm-generic/nopml4-pgalloc.h	2004-11-07 16:36:21.087148456 -0800
@@ -3,7 +3,7 @@
 
 /* Fallback used for architectures without 4 level pagetables */
 
-#define pml4_populate(mm, pml4, pgd) ((mm)->pml4 = (pml4_t *)(pgd))
+#define pml4_populate(mm, pml4, pgd) ((mm)->pml4.pgd = (pgd))
 
 static inline pml4_t *pml4_alloc(struct mm_struct *mm)
 {
diff -puN include/asm-generic/nopml4-pgtable.h~4level-make-3level-fallback-more-type-safe include/asm-generic/nopml4-pgtable.h
--- 25/include/asm-generic/nopml4-pgtable.h~4level-make-3level-fallback-more-type-safe	2004-11-07 16:36:21.083149064 -0800
+++ 25-akpm/include/asm-generic/nopml4-pgtable.h	2004-11-07 16:36:21.087148456 -0800
@@ -7,9 +7,9 @@
 
    pml4 is simply casted to pgd */
 
-#define pml4_ERROR(x)
+#define pml4_ERROR(x) do {} while(0)
 #define pml4_bad(x) 0
-#define pml4_clear(x)
+#define pml4_clear(x) do {} while(0)
 
 /* Covers all address room. This implies that walks will usually wrap.
    The code has to handle this.
_
