From: David Miller Date: Sat, 23 Sep 2006 05:31:36 +0000 (-0700) Subject: [KERNEL] Do not truncate to 'int' in ALIGN() macro. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4c8bd7eeee4c8f157fb61fb64b57500990b42e0e;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git [KERNEL] Do not truncate to 'int' in ALIGN() macro. Signed-off-by: David S. Miller Signed-off-by: Linus Torvalds --- diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 851aa1bcfc1a..2b2ae4fdce8b 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -31,7 +31,7 @@ extern const char linux_banner[]; #define STACK_MAGIC 0xdeadbeef #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) -#define ALIGN(x,a) (((x)+(a)-1)&~((a)-1)) +#define ALIGN(x,a) (((x)+(a)-1UL)&~((a)-1UL)) #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f)) #define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y))