aboutsummaryrefslogtreecommitdiff
path: root/Documentation/RCU/rculist_nulls.rst
diff options
context:
space:
mode:
authorGravatar SeongJae Park <sj@kernel.org> 2023-06-13 18:24:31 +0000
committerGravatar Paul E. McKenney <paulmck@kernel.org> 2023-07-14 14:55:56 -0700
commit3f831e38cecdd72a139a130da11f95be38481034 (patch)
tree041aad534b76a5b8066f8401fa036c40e4a23181 /Documentation/RCU/rculist_nulls.rst
parentdocs/RCU: Add the missing rcu_read_unlock() (diff)
downloadlinux-3f831e38cecdd72a139a130da11f95be38481034.tar.gz
linux-3f831e38cecdd72a139a130da11f95be38481034.tar.bz2
linux-3f831e38cecdd72a139a130da11f95be38481034.zip
Docs/RCU/rculist_nulls: Fix trivial coding style
Lookup example of non-hlist_nulls management is missing a semicolon, and having inconsistent indentation (one line is using single space indentation while others are using two spaces indentation). Fix the trivial issues. Signed-off-by: SeongJae Park <sj@kernel.org> Reviewed-by: Joel Fernandes (Google) <joel@joelfernandes.org> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'Documentation/RCU/rculist_nulls.rst')
-rw-r--r--Documentation/RCU/rculist_nulls.rst6
1 files changed, 3 insertions, 3 deletions
diff --git a/Documentation/RCU/rculist_nulls.rst b/Documentation/RCU/rculist_nulls.rst
index 0612a6387d8e..25b739885cfa 100644
--- a/Documentation/RCU/rculist_nulls.rst
+++ b/Documentation/RCU/rculist_nulls.rst
@@ -26,7 +26,7 @@ algorithms:
::
begin:
- rcu_read_lock()
+ rcu_read_lock();
obj = lockless_lookup(key);
if (obj) {
if (!try_get_ref(obj)) { // might fail for free objects
@@ -70,8 +70,8 @@ And note the traditional hlist_for_each_entry_rcu() misses this smp_rmb()::
pos && ({ prefetch(pos->next); 1; }) &&
({ tpos = hlist_entry(pos, typeof(*tpos), member); 1; });
pos = rcu_dereference(pos->next))
- if (obj->key == key)
- return obj;
+ if (obj->key == key)
+ return obj;
return NULL;
Quoting Corey Minyard::