Skip to contentSkip to conversation

user_events: make data_file and status_file static

PATCH New sunliming 1 participant 1 message Jul 15, 2022

lore
Share & tools
lore

sunliming

author
#0 lore raw

PATCH 1/1 user_events: make data_file and status_file static

Variables data_file and status_file are not used outside of example.c, so marks them static.

---
 samples/user_events/example.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
samples/user_events/example.c +2 -2
index 4f5778e441c0..13b514bc03e9 100644
@@ -15,8 +15,8 @@
 #include <linux/user_events.h>
 
 /* Assumes debugfs is mounted */
-const char *data_file = "/sys/kernel/debug/tracing/user_events_data";
-const char *status_file = "/sys/kernel/debug/tracing/user_events_status";
+static const char *data_file = "/sys/kernel/debug/tracing/user_events_data";
+static const char *status_file = "/sys/kernel/debug/tracing/user_events_status";
 
 static int event_status(char **status)
 {
Signature · 1 line
2.25.1