mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] rculist.h: docu: fix wrong function name
@ 2023-09-19 19:47 Philipp Stanner
  2023-09-20 10:53 ` Paul E. McKenney
  0 siblings, 1 reply; 3+ messages in thread
From: Philipp Stanner @ 2023-09-19 19:47 UTC (permalink / raw)
  To: Paul E. McKenney, Frederic Weisbecker, Neeraj Upadhyay,
	Joel Fernandes, Josh Triplett, Boqun Feng, Steven Rostedt,
	Mathieu Desnoyers, Lai Jiangshan, Zqiang
  Cc: rcu, linux-kernel, Philipp Stanner

The header contains a comment that details why the functions
list_empty_rcu() and list_first_entry_rcu() don't exist. It explains
that they don't exist because standard list_empty() can be used just as
well, but one can not expect sane results from a subsequent, quote,
"list_first_entry_rcu()".

This function (obviously) does not exist. What the comment's author
actually meant was the standard list-function list_first_entry().

Change the function name in that comment from list_first_entry_rcu() to
list_first_entry().

Additionally, add the parenthesis to list_first_or_null_rcu to be congruent
with that entire comment's style.

Signed-off-by: Philipp Stanner <pstanner@redhat.com>
---
Hi!
I hope this helps.
I wasn't 100.000000% sure if that's correct, but I thought asking is for
free 8-)

Regards,
P.
---
 include/linux/rculist.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/rculist.h b/include/linux/rculist.h
index d29740be4833..4837d8892691 100644
--- a/include/linux/rculist.h
+++ b/include/linux/rculist.h
@@ -331,9 +331,9 @@ static inline void list_splice_tail_init_rcu(struct list_head *list,
  * rcu_dereference() is not needed), which means that list_empty() can be
  * used anywhere you would want to use list_empty_rcu().  Just don't
  * expect anything useful to happen if you do a subsequent lockless
- * call to list_first_entry_rcu()!!!
+ * call to list_first_entry()!!!
  *
- * See list_first_or_null_rcu for an alternative.
+ * See list_first_or_null_rcu() for an alternative.
  */
 
 /**
-- 
2.41.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-09-20 13:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-19 19:47 [PATCH] rculist.h: docu: fix wrong function name Philipp Stanner
2023-09-20 10:53 ` Paul E. McKenney
2023-09-20 12:58   ` Philipp Stanner

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