diff options
author | Steven Rostedt (Red Hat) <rostedt@goodmis.org> | 2013-07-12 22:50:28 +0200 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2013-07-29 23:07:49 +0200 |
commit | e66c33d579ea566d10e8c8695a7168aae3e02992 (patch) | |
tree | b316d091004d823319afb6995539d4ad09386296 /kernel/rcutree.h | |
parent | tracing: Add __tracepoint_string() to export string pointers (diff) | |
download | linux-e66c33d579ea566d10e8c8695a7168aae3e02992.tar.xz linux-e66c33d579ea566d10e8c8695a7168aae3e02992.zip |
rcu: Add const annotation to char * for RCU tracepoints and functions
All the RCU tracepoints and functions that reference char pointers do
so with just 'char *' even though they do not modify the contents of
the string itself. This will cause warnings if a const char * is used
in one of these functions.
The RCU tracepoints store the pointer to the string to refer back to them
when the trace output is displayed. As this can be minutes, hours or
even days later, those strings had better be constant.
This change also opens the door to allow the RCU tracepoint strings and
their addresses to be exported so that userspace tracing tools can
translate the contents of the pointers of the RCU tracepoints.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to '')
-rw-r--r-- | kernel/rcutree.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/rcutree.h b/kernel/rcutree.h index b3832581043c..cbdeac6cea9e 100644 --- a/kernel/rcutree.h +++ b/kernel/rcutree.h @@ -445,7 +445,7 @@ struct rcu_state { /* for CPU stalls. */ unsigned long gp_max; /* Maximum GP duration in */ /* jiffies. */ - char *name; /* Name of structure. */ + const char *name; /* Name of structure. */ char abbr; /* Abbreviated name. */ struct list_head flavors; /* List of RCU flavors. */ struct irq_work wakeup_work; /* Postponed wakeups */ |