aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rcu/tree.c
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2015-03-04 10:39:27 -0500
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2015-05-27 15:57:59 -0400
commitb28a7c016618e5e32e0703e3dd111dbba02715ff (patch)
tree87f1d54c122911059cfac2b1933ea07b62d6a7de /kernel/rcu/tree.c
parent727b705baf7d091a9bc5494d7f1d9699b6932531 (diff)
rcu: Tell the compiler that rcu_state_p is immutable
This commit adds a "const" tag to the declarations of rcu_state_p, which should allow the compiler to generate better code and also to catch erroneous assignments to this variable. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel/rcu/tree.c')
-rw-r--r--kernel/rcu/tree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index 0628df155970..f031700514dd 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -110,7 +110,7 @@ struct rcu_state sname##_state = { \
110RCU_STATE_INITIALIZER(rcu_sched, 's', call_rcu_sched); 110RCU_STATE_INITIALIZER(rcu_sched, 's', call_rcu_sched);
111RCU_STATE_INITIALIZER(rcu_bh, 'b', call_rcu_bh); 111RCU_STATE_INITIALIZER(rcu_bh, 'b', call_rcu_bh);
112 112
113static struct rcu_state *rcu_state_p; 113static struct rcu_state *const rcu_state_p;
114LIST_HEAD(rcu_struct_flavors); 114LIST_HEAD(rcu_struct_flavors);
115 115
116/* Increase (but not decrease) the CONFIG_RCU_FANOUT_LEAF at boot time. */ 116/* Increase (but not decrease) the CONFIG_RCU_FANOUT_LEAF at boot time. */