[PATCH] tracing: remove duplicate latency_fsnotify() stub

Arnd Bergmann posted 1 patch 1 day ago
kernel/trace/trace_snapshot.c | 2 --
1 file changed, 2 deletions(-)
[PATCH] tracing: remove duplicate latency_fsnotify() stub
Posted by Arnd Bergmann 1 day ago
From: Arnd Bergmann <arnd@arndb.de>

During the move, an extra copy of latency_fsnotify() crept in:

kernel/trace/trace_snapshot.c:395:20: error: redefinition of 'latency_fsnotify'
  395 | static inline void latency_fsnotify(struct trace_array *tr) { }
      |                    ^~~~~~~~~~~~~~~~
In file included from kernel/trace/trace_snapshot.c:6:
kernel/trace/trace.h:858:20: note: previous definition of 'latency_fsnotify' with type 'void(struct trace_array *)'
  858 | static inline void latency_fsnotify(struct trace_array *tr) { }
      |                    ^~~~~~~~~~~~~~~~

The function is still called from the hwlat and osnoise tracers, so the
copy in the header file is the one that has to stay.

Remove the extra one from trace_snapshot.c

Fixes: bade44fe5462 ("tracing: Move snapshot code out of trace.c and into trace_snapshot.c")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
Please fold into the commit that moves the code, if possible
---
 kernel/trace/trace_snapshot.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/kernel/trace/trace_snapshot.c b/kernel/trace/trace_snapshot.c
index 8865b2ef2264..a54e9533e79d 100644
--- a/kernel/trace/trace_snapshot.c
+++ b/kernel/trace/trace_snapshot.c
@@ -391,8 +391,6 @@ 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;
 
-- 
2.39.5