diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2015-03-04 07:39:27 -0800 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2015-05-27 12:57:59 -0700 |
commit | b28a7c016618e5e32e0703e3dd111dbba02715ff (patch) | |
tree | 87f1d54c122911059cfac2b1933ea07b62d6a7de /kernel/rcu/tree.c | |
parent | 727b705baf7d091a9bc5494d7f1d9699b6932531 (diff) | |
download | lwn-b28a7c016618e5e32e0703e3dd111dbba02715ff.tar.gz lwn-b28a7c016618e5e32e0703e3dd111dbba02715ff.zip |
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.c | 2 |
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 = { \ RCU_STATE_INITIALIZER(rcu_sched, 's', call_rcu_sched); RCU_STATE_INITIALIZER(rcu_bh, 'b', call_rcu_bh); -static struct rcu_state *rcu_state_p; +static struct rcu_state *const rcu_state_p; LIST_HEAD(rcu_struct_flavors); /* Increase (but not decrease) the CONFIG_RCU_FANOUT_LEAF at boot time. */ |