aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/radix-tree/linux/rcupdate.h
diff options
context:
space:
mode:
authorAndrea Parri <andrea.parri@amarulasolutions.com>2019-05-27 10:49:57 +0200
committerPaul E. McKenney <paulmck@linux.ibm.com>2019-06-13 15:38:34 -0700
commit9129b017b54dab09eb69b7269026243156e5188e (patch)
tree581b8b644eea503a0a7fb9765217871e11fc2272 /tools/testing/radix-tree/linux/rcupdate.h
parentrcu: Force inlining of rcu_read_lock() (diff)
downloadlinux-dev-9129b017b54dab09eb69b7269026243156e5188e.tar.xz
linux-dev-9129b017b54dab09eb69b7269026243156e5188e.zip
rcu: Don't return a value from rcu_assign_pointer()
Quoting Paul [1]: "Given that a quick (and perhaps error-prone) search of the uses of rcu_assign_pointer() in v5.1 didn't find a single use of the return value, let's please instead change the documentation and implementation to eliminate the return value." [1] https://lkml.kernel.org/r/20190523135013.GL28207@linux.ibm.com Signed-off-by: Andrea Parri <andrea.parri@amarulasolutions.com> Cc: "Paul E. McKenney" <paulmck@linux.ibm.com> Cc: Josh Triplett <josh@joshtriplett.org> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Lai Jiangshan <jiangshanlai@gmail.com> Cc: Joel Fernandes <joel@joelfernandes.org> Cc: rcu@vger.kernel.org Cc: Peter Zijlstra <peterz@infradead.org> Cc: Will Deacon <will.deacon@arm.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Matthew Wilcox <willy@infradead.org> Cc: Sasha Levin <sashal@kernel.org> Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com>
Diffstat (limited to '')
-rw-r--r--tools/testing/radix-tree/linux/rcupdate.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/radix-tree/linux/rcupdate.h b/tools/testing/radix-tree/linux/rcupdate.h
index fd280b070fdb..fed468fb0c78 100644
--- a/tools/testing/radix-tree/linux/rcupdate.h
+++ b/tools/testing/radix-tree/linux/rcupdate.h
@@ -7,6 +7,6 @@
#define rcu_dereference_raw(p) rcu_dereference(p)
#define rcu_dereference_protected(p, cond) rcu_dereference(p)
#define rcu_dereference_check(p, cond) rcu_dereference(p)
-#define RCU_INIT_POINTER(p, v) (p) = (v)
+#define RCU_INIT_POINTER(p, v) do { (p) = (v); } while (0)
#endif