nlm: Ensure callback code also checks that the files match
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / include / linux / kernel.h
index e9ef6d6b51d5b07f6471e96dc20efa5685416220..5f4554b8348ad4c5fe8ce22563aa1602ff007ee0 100644 (file)
 #define ULLONG_MAX     (~0ULL)
 #define SIZE_MAX       (~(size_t)0)
 
+#define U8_MAX         ((u8)~0U)
+#define S8_MAX         ((s8)(U8_MAX>>1))
+#define S8_MIN         ((s8)(-S8_MAX - 1))
+#define U16_MAX                ((u16)~0U)
+#define S16_MAX                ((s16)(U16_MAX>>1))
+#define S16_MIN                ((s16)(-S16_MAX - 1))
+#define U32_MAX                ((u32)~0U)
+#define S32_MAX                ((s32)(U32_MAX>>1))
+#define S32_MIN                ((s32)(-S32_MAX - 1))
+#define U64_MAX                ((u64)~0ULL)
+#define S64_MAX                ((s64)(U64_MAX>>1))
+#define S64_MIN                ((s64)(-S64_MAX - 1))
+
 #define STACK_MAGIC    0xdeadbeef
 
 #define REPEAT_BYTE(x) ((~0ul / 0xff) * (x))
@@ -544,7 +557,7 @@ do {                                                        \
 
 #define do_trace_printk(fmt, args...)                                  \
 do {                                                                   \
-       static const char *trace_printk_fmt                             \
+       static const char *trace_printk_fmt __used                      \
                __attribute__((section("__trace_printk_fmt"))) =        \
                __builtin_constant_p(fmt) ? fmt : NULL;                 \
                                                                        \
@@ -591,7 +604,7 @@ extern int __trace_puts(unsigned long ip, const char *str, int size);
  */
 
 #define trace_puts(str) ({                                             \
-       static const char *trace_printk_fmt                             \
+       static const char *trace_printk_fmt __used                      \
                __attribute__((section("__trace_printk_fmt"))) =        \
                __builtin_constant_p(str) ? str : NULL;                 \
                                                                        \
@@ -611,7 +624,7 @@ extern void trace_dump_stack(int skip);
 #define ftrace_vprintk(fmt, vargs)                                     \
 do {                                                                   \
        if (__builtin_constant_p(fmt)) {                                \
-               static const char *trace_printk_fmt                     \
+               static const char *trace_printk_fmt __used              \
                  __attribute__((section("__trace_printk_fmt"))) =      \
                        __builtin_constant_p(fmt) ? fmt : NULL;         \
                                                                        \