Merge branch 'next' of git://git.monstr.eu/linux-2.6-microblaze
[cascardo/linux.git] / include / linux / kernel.h
index 645231c..ec55a3c 100644 (file)
@@ -38,6 +38,8 @@
 
 #define STACK_MAGIC    0xdeadbeef
 
+#define REPEAT_BYTE(x) ((~0ul / 0xff) * (x))
+
 #define ALIGN(x, a)            __ALIGN_KERNEL((x), (a))
 #define __ALIGN_MASK(x, mask)  __ALIGN_KERNEL_MASK((x), (mask))
 #define PTR_ALIGN(p, a)                ((typeof(p))ALIGN((unsigned long)(p), (a)))
@@ -480,15 +482,16 @@ do {                                                                      \
 
 #define trace_printk(fmt, args...)                                     \
 do {                                                                   \
+       static const char *trace_printk_fmt                             \
+               __attribute__((section("__trace_printk_fmt"))) =        \
+               __builtin_constant_p(fmt) ? fmt : NULL;                 \
+                                                                       \
        __trace_printk_check_format(fmt, ##args);                       \
-       if (__builtin_constant_p(fmt)) {                                \
-               static const char *trace_printk_fmt                     \
-                 __attribute__((section("__trace_printk_fmt"))) =      \
-                       __builtin_constant_p(fmt) ? fmt : NULL;         \
                                                                        \
+       if (__builtin_constant_p(fmt))                                  \
                __trace_bprintk(_THIS_IP_, trace_printk_fmt, ##args);   \
-       } else                                                          \
-               __trace_printk(_THIS_IP_, fmt, ##args);         \
+       else                                                            \
+               __trace_printk(_THIS_IP_, fmt, ##args);                 \
 } while (0)
 
 extern __printf(2, 3)