[KERNEL] Do not truncate to 'int' in ALIGN() macro.
[linux-drm-fsl-dcu.git] / include / linux / kernel.h
index 5c1ec1f84eab93eea32a8d173486ff2cbcd5036b..2b2ae4fdce8bbd689e5be2fe52be1ccc3add879b 100644 (file)
@@ -31,8 +31,9 @@ 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))
 
 #define        KERN_EMERG      "<0>"   /* system is unusable                   */
 #define        KERN_ALERT      "<1>"   /* action must be taken immediately     */
@@ -209,6 +210,7 @@ extern enum system_states {
 extern void dump_stack(void);
 
 #ifdef DEBUG
+/* If you are writing a driver, please use dev_dbg instead */
 #define pr_debug(fmt,arg...) \
        printk(KERN_DEBUG fmt,##arg)
 #else