]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - kernel/trace/trace.h
tracing: Fix clang -Wint-in-bool-context warnings in IF_ASSIGN macro
[linux.git] / kernel / trace / trace.h
index 005f08629b8bed8d9d6ec0bcc5a10255cc0d7094..f801d154ff6a3bb71950c215d8598c9a9a5acbe0 100644 (file)
@@ -365,11 +365,11 @@ static inline struct trace_array *top_trace_array(void)
        __builtin_types_compatible_p(typeof(var), type *)
 
 #undef IF_ASSIGN
-#define IF_ASSIGN(var, entry, etype, id)               \
-       if (FTRACE_CMP_TYPE(var, etype)) {              \
-               var = (typeof(var))(entry);             \
-               WARN_ON(id && (entry)->type != id);     \
-               break;                                  \
+#define IF_ASSIGN(var, entry, etype, id)                       \
+       if (FTRACE_CMP_TYPE(var, etype)) {                      \
+               var = (typeof(var))(entry);                     \
+               WARN_ON(id != 0 && (entry)->type != id);        \
+               break;                                          \
        }
 
 /* Will cause compile errors if type is not found. */
@@ -677,7 +677,6 @@ trace_buffer_iter(struct trace_iterator *iter, int cpu)
 
 int tracer_init(struct tracer *t, struct trace_array *tr);
 int tracing_is_enabled(void);
-void tracing_reset(struct trace_buffer *buf, int cpu);
 void tracing_reset_online_cpus(struct trace_buffer *buf);
 void tracing_reset_current(int cpu);
 void tracing_reset_all_online_cpus(void);