avr32: cleanup - use _AC macro to define PAGE_SIZE
authorCyrill Gorcunov <gorcunov@gmail.com>
Sun, 3 Feb 2008 11:22:18 +0000 (14:22 +0300)
committerHaavard Skinnemoen <haavard.skinnemoen@atmel.com>
Sun, 20 Apr 2008 00:40:06 +0000 (20:40 -0400)
PAGE_SIZE is used both from assembly and C code. We want to have type
specifiers when using it from C, but this will make the assembler
confused, so we need to make it conditional.

This is exactly what the _AC macro is for, so using it allows us to
get rid of a few lines of cpp noise.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
include/asm-avr32/page.h

index 5582968feee853220432ac4b503c038c4beb7d0f..cbbc5ca9728bb94558513df79d18904633b84ca9 100644 (file)
@@ -8,13 +8,11 @@
 #ifndef __ASM_AVR32_PAGE_H
 #define __ASM_AVR32_PAGE_H
 
+#include <linux/const.h>
+
 /* PAGE_SHIFT determines the page size */
 #define PAGE_SHIFT     12
-#ifdef __ASSEMBLY__
-#define PAGE_SIZE      (1 << PAGE_SHIFT)
-#else
-#define PAGE_SIZE      (1UL << PAGE_SHIFT)
-#endif
+#define PAGE_SIZE      (_AC(1, UL) << PAGE_SHIFT)
 #define PAGE_MASK      (~(PAGE_SIZE-1))
 #define PTE_MASK       PAGE_MASK