Skip to contentSkip to conversation

kernel/trace/trace_probe.c - make variable static

PATCH Applied Valdis Kl=?utf-8?Q?=c4=93?=tnieks 2 participants 2 messages Mar 12, 2019 Tracing

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel/trace/trace_probe.c - make variable static

sparse complains:
CHECK kernel/trace/trace_probe.c
kernel/trace/trace_probe.c:16:12: warning: symbol 'reserved_field_names' was not declared. Should it be static?

Yes, it should be static.

kernel/trace/trace_probe.c +1 -1
index 89da34b326e3..cfcf77e6fb19 100644
@@ -13,7 +13,7 @@
 
 #include "trace_probe.h"
 
-const char *reserved_field_names[] = {
+static const char *reserved_field_names[] = {
 	"common_type",
 	"common_flags",
 	"common_preempt_count",
maintainer Applied
#1 lore raw
Quoted 5 lines · On Tue, 12 Mar 2019 04:52:58 -0400 "Valdis Klētnieks"…

sparse complains:
CHECK kernel/trace/trace_probe.c
kernel/trace/trace_probe.c:16:12: warning: symbol 'reserved_field_names' was not declared. Should it be static?

Yes, it should be static.

Thanks, applied.

Note, I changed the subject to:

tracing/probes: Make reserved_field_names static

To follow the naming convention of the tracing directory.

-- Steve

Quoted 16 lines
kernel/trace/trace_probe.c +1 -1
index 89da34b326e3..cfcf77e6fb19 100644
@@ -13,7 +13,7 @@
 
 #include "trace_probe.h"
 
-const char *reserved_field_names[] = {
+static const char *reserved_field_names[] = {
 	"common_type",
 	"common_flags",
 	"common_preempt_count",