diff options
| author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2015-03-04 10:39:27 -0500 | 
|---|---|---|
| committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2015-05-27 15:57:59 -0400 | 
| commit | b28a7c016618e5e32e0703e3dd111dbba02715ff (patch) | |
| tree | 87f1d54c122911059cfac2b1933ea07b62d6a7de /kernel/rcu/tree.c | |
| parent | 727b705baf7d091a9bc5494d7f1d9699b6932531 (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.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 = { \ | |||
| 110 | RCU_STATE_INITIALIZER(rcu_sched, 's', call_rcu_sched); | 110 | RCU_STATE_INITIALIZER(rcu_sched, 's', call_rcu_sched); | 
| 111 | RCU_STATE_INITIALIZER(rcu_bh, 'b', call_rcu_bh); | 111 | RCU_STATE_INITIALIZER(rcu_bh, 'b', call_rcu_bh); | 
| 112 | 112 | ||
| 113 | static struct rcu_state *rcu_state_p; | 113 | static struct rcu_state *const rcu_state_p; | 
| 114 | LIST_HEAD(rcu_struct_flavors); | 114 | LIST_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. */ | 
