Skip to contentSkip to conversation

tracing: Remove duplicate latency_fsnotify() stub

PATCH New Steven Rostedt 1 participant 1 message Mar 31 Tracing

lore
Share & tools
lore

Steven Rostedt

author maintainer
#0 lore raw

PATCH 1/1 tracing: Remove duplicate latency_fsnotify() stub

From: Steven Rostedt <[email protected]>

When the SNAPSHOT is defined but FSNOTIFY is not the latency_fsnotify() function is turned into a static inline stub. But this stub was defined in both trace.h and trace_snapshot.c causing a error in build when CONFIG_SNAPSHOT is defined but FSNOTIFY is not. The stub is not needed in trace_snapshot.c as it will be defined in trace.h, remove it from the C file.

Fixes bade44fe5462 ("tracing: Move snapshot code out of trace.c and into trace_snapshot.c")
---
 kernel/trace/trace.h          | 2 +-
 kernel/trace/trace_snapshot.c | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)
kernel/trace/trace.h +1 -1
index a3ea735a9ef6..a59d6acdf95d 100644
@@ -845,13 +845,13 @@ void update_max_tr_single(struct trace_array *tr,
 #if defined(CONFIG_TRACER_MAX_TRACE) && defined(CONFIG_FSNOTIFY)
 # define LATENCY_FS_NOTIFY
 #endif
+#endif /* CONFIG_TRACER_SNAPSHOT */
 
 #ifdef LATENCY_FS_NOTIFY
 void latency_fsnotify(struct trace_array *tr);
 #else
 static inline void latency_fsnotify(struct trace_array *tr) { }
 #endif
-#endif /* CONFIG_TRACER_SNAPSHOT */
 
 #ifdef CONFIG_STACKTRACE
 void __trace_stack(struct trace_array *tr, unsigned int trace_ctx, int skip);
kernel/trace/trace_snapshot.c +1 -2
index 8865b2ef2264..07b43c9863a2 100644
@@ -391,9 +391,8 @@ void latency_fsnotify(struct trace_array *tr)
 	 */
 	irq_work_queue(&tr->fsnotify_irqwork);
 }
-#else
-static inline void latency_fsnotify(struct trace_array *tr) { }
 #endif /* LATENCY_FS_NOTIFY */
+
 static const struct file_operations tracing_max_lat_fops;
 
 void trace_create_maxlat_file(struct trace_array *tr,
Signature · 1 line
2.51.0