lockd: convert nsm_mutex to a spinlock
[safe/jmp/linux-2.6] / include / linux / marker.h
index b5f9563..430f6ad 100644 (file)
@@ -61,15 +61,12 @@ struct marker {
  */
 #define __trace_mark(name, call_private, format, args...)              \
        do {                                                            \
-               static const char __mstrtab_name_##name[]               \
+               static const char __mstrtab_##name[]                    \
                __attribute__((section("__markers_strings")))           \
-               = #name;                                                \
-               static const char __mstrtab_format_##name[]             \
-               __attribute__((section("__markers_strings")))           \
-               = format;                                               \
+               = #name "\0" format;                                    \
                static struct marker __mark_##name                      \
                __attribute__((section("__markers"), aligned(8))) =     \
-               { __mstrtab_name_##name, __mstrtab_format_##name,       \
+               { __mstrtab_##name, &__mstrtab_##name[sizeof(#name)],   \
                0, 0, marker_probe_cb,                                  \
                { __mark_empty_function, NULL}, NULL };                 \
                __mark_check_format(format, ## args);                   \
@@ -107,10 +104,16 @@ static inline void marker_update_probe_range(struct marker *begin,
 #define MARK_NOARGS " "
 
 /* To be used for string format validity checking with gcc */
-static inline void __printf(1, 2) __mark_check_format(const char *fmt, ...)
+static inline void __printf(1, 2) ___mark_check_format(const char *fmt, ...)
 {
 }
 
+#define __mark_check_format(format, args...)                           \
+       do {                                                            \
+               if (0)                                                  \
+                       ___mark_check_format(format, ## args);          \
+       } while (0)
+
 extern marker_probe_func __mark_empty_function;
 
 extern void marker_probe_cb(const struct marker *mdata,