aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rcutorture.c
diff options
context:
space:
mode:
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>2013-07-12 16:50:28 -0400
committerSteven Rostedt <rostedt@goodmis.org>2013-07-29 17:07:49 -0400
commite66c33d579ea566d10e8c8695a7168aae3e02992 (patch)
treeb316d091004d823319afb6995539d4ad09386296 /kernel/rcutorture.c
parent102c9323c35a83789ad5ebd3c45fa8fb389add88 (diff)
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 'kernel/rcutorture.c')
-rw-r--r--kernel/rcutorture.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/rcutorture.c b/kernel/rcutorture.c
index f4871e52c546..3d936f0fbcd8 100644
--- a/kernel/rcutorture.c
+++ b/kernel/rcutorture.c
@@ -267,7 +267,7 @@ rcutorture_shutdown_notify(struct notifier_block *unused1,
267 * Absorb kthreads into a kernel function that won't return, so that 267 * Absorb kthreads into a kernel function that won't return, so that
268 * they won't ever access module text or data again. 268 * they won't ever access module text or data again.
269 */ 269 */
270static void rcutorture_shutdown_absorb(char *title) 270static void rcutorture_shutdown_absorb(const char *title)
271{ 271{
272 if (ACCESS_ONCE(fullstop) == FULLSTOP_SHUTDOWN) { 272 if (ACCESS_ONCE(fullstop) == FULLSTOP_SHUTDOWN) {
273 pr_notice( 273 pr_notice(
@@ -337,7 +337,7 @@ rcu_random(struct rcu_random_state *rrsp)
337} 337}
338 338
339static void 339static void
340rcu_stutter_wait(char *title) 340rcu_stutter_wait(const char *title)
341{ 341{
342 while (stutter_pause_test || !rcutorture_runnable) { 342 while (stutter_pause_test || !rcutorture_runnable) {
343 if (rcutorture_runnable) 343 if (rcutorture_runnable)
@@ -366,7 +366,7 @@ struct rcu_torture_ops {
366 int (*stats)(char *page); 366 int (*stats)(char *page);
367 int irq_capable; 367 int irq_capable;
368 int can_boost; 368 int can_boost;
369 char *name; 369 const char *name;
370}; 370};
371 371
372static struct rcu_torture_ops *cur_ops; 372static struct rcu_torture_ops *cur_ops;
@@ -1364,7 +1364,7 @@ rcu_torture_stutter(void *arg)
1364} 1364}
1365 1365
1366static inline void 1366static inline void
1367rcu_torture_print_module_parms(struct rcu_torture_ops *cur_ops, char *tag) 1367rcu_torture_print_module_parms(struct rcu_torture_ops *cur_ops, const char *tag)
1368{ 1368{
1369 pr_alert("%s" TORTURE_FLAG 1369 pr_alert("%s" TORTURE_FLAG
1370 "--- %s: nreaders=%d nfakewriters=%d " 1370 "--- %s: nreaders=%d nfakewriters=%d "