Align: Make sure 1 is treated as unsigned long instead of int
authorStefan Reinauer <reinauer@chromium.org>
Fri, 30 Mar 2012 20:00:46 +0000 (13:00 -0700)
committerStefan Reinauer <stefan.reinauer@coreboot.org>
Mon, 2 Apr 2012 16:39:48 +0000 (18:39 +0200)
... and drop duplicate definition in via/epia-n code.

Change-Id: Id79daaaa35c4d412c8c1f621a3638d129681d331
Signed-off-by: Stefan Reinauer <reinauer@google.com>
Reviewed-on: http://review.coreboot.org/820
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
src/include/stdlib.h
src/mainboard/via/epia-n/acpi_tables.c

index 45420d78764068de6f37852c0585b66ea756372b..5465c14f925be86ecd16fbcb0499d704b3674749 100644 (file)
@@ -5,7 +5,7 @@
 
 #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
 
-#define ALIGN(x,a)              __ALIGN_MASK(x,(typeof(x))(a)-1)
+#define ALIGN(x,a)              __ALIGN_MASK(x,(typeof(x))(a)-1UL)
 #define __ALIGN_MASK(x,mask)    (((x)+(mask))&~(mask))
 
 #define MIN(a,b) ((a) < (b) ? (a) : (b))
index 589e14c60653353b1cb2c1589449d40605173fdf..b4966bb1db0dfd3801211d42bbda06896184b1d0 100644 (file)
@@ -118,10 +118,6 @@ unsigned long acpi_fill_srat(unsigned long current)
        return current;
 }
 
-#define ALIGN(x,a)              __ALIGN_MASK(x,(typeof(x))(a)-1)
-#define __ALIGN_MASK(x,mask)    (((x)+(mask))&~(mask))
-#define ALIGN_CURRENT current = ((current + 0x0f) & -0x10)
-
 unsigned long write_acpi_tables(unsigned long start)
 {
        unsigned long current;