From: "Paul E. McKenney" <paulmck@kernel.org>
To: rcu@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, kernel-team@meta.com,
rostedt@goodmis.org, SeongJae Park <sj@kernel.org>,
Joel Fernandes <joel@joelfernandes.org>,
"Paul E . McKenney" <paulmck@kernel.org>
Subject: [PATCH rcu 3/7] Docs/RCU/rculist_nulls: Fix trivial coding style
Date: Mon, 17 Jul 2023 11:01:06 -0700 [thread overview]
Message-ID: <20230717180110.1097362-3-paulmck@kernel.org> (raw)
In-Reply-To: <ee7a3e6b-eb1b-4413-b5c3-83b22f7271dd@paulmck-laptop>
From: SeongJae Park <sj@kernel.org>
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>
---
Documentation/RCU/rculist_nulls.rst | 6 +++---
1 file 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::
--
2.40.1
next prev parent reply other threads:[~2023-07-17 18:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-17 18:01 [PATCH rcu 0/7] Documentation updates for v6.6 Paul E. McKenney
2023-07-17 18:01 ` [PATCH rcu 1/7] documentation/rcu: Fix typo Paul E. McKenney
2023-07-17 18:01 ` [PATCH rcu 2/7] docs/RCU: Add the missing rcu_read_unlock() Paul E. McKenney
2023-07-17 18:01 ` Paul E. McKenney [this message]
2023-07-17 18:01 ` [PATCH rcu 4/7] Docs/RCU/rculist_nulls: Assign 'obj' before use from the examples Paul E. McKenney
2023-07-17 18:01 ` [PATCH rcu 5/7] Docs/RCU/rculist_nulls: Specify type of the object in examples Paul E. McKenney
2023-07-17 18:01 ` [PATCH rcu 6/7] Docs/RCU/rculist_nulls: Fix hlist_[nulls]_head field names of 'obj' Paul E. McKenney
2023-07-17 18:01 ` [PATCH rcu 7/7] Docs/RCU/rculist_nulls: Fix text about atomic_set_release() Paul E. McKenney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230717180110.1097362-3-paulmck@kernel.org \
--to=paulmck@kernel.org \
--cc=joel@joelfernandes.org \
--cc=kernel-team@meta.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rcu@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=sj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome