summaryrefslogtreecommitdiffstats
path: root/kernel/rcu/tree.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2020-09-16 11:45:28 -0700
committerPaul E. McKenney <paulmck@kernel.org>2020-11-02 17:10:01 -0800
commit65e9eb1ccfe56b41a0d8bfec651ea014968413cb (patch)
treea70ecce85bb7c8cb0c4f30b129b3db51b309f0c7 /kernel/rcu/tree.c
parentcd539cff9470fe1dacf0bf5ab3f54f37b854d6fc (diff)
downloadlinux-stable-65e9eb1ccfe56b41a0d8bfec651ea014968413cb.tar.gz
linux-stable-65e9eb1ccfe56b41a0d8bfec651ea014968413cb.tar.bz2
linux-stable-65e9eb1ccfe56b41a0d8bfec651ea014968413cb.zip
rcu: Prevent RCU_LOCKDEP_WARN() from swallowing the condition
We run into a unused variable warning in bridge code when variable is only used inside the condition of rcu_dereference_protected(). #define mlock_dereference(X, br) \ rcu_dereference_protected(X, lockdep_is_held(&br->multicast_lock)) Since on builds with CONFIG_PROVE_RCU=n rcu_dereference_protected() compiles to nothing the compiler doesn't see the variable use. This commit therefore prevents this warning by adding the condition as dead code. Signed-off-by: Jakub Kicinski <kuba@kernel.org> -- CC: paulmck@kernel.org CC: josh@joshtriplett.org CC: rostedt@goodmis.org CC: mathieu.desnoyers@efficios.com CC: joel@joelfernandes.org CC: jiangshanlai@gmail.com Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'kernel/rcu/tree.c')
0 files changed, 0 insertions, 0 deletions