Skip to contentSkip to conversation

rcu: fix kerneldoc comments in rcuupdate.h

PATCH Superseded Tobias Klauser 2 participants 4 messages Jul 2, 2020 – Jul 9, 2020 RCU

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rcu: fix kerneldoc comments in rcuupdate.h

Fix the kerneldoc comments for rcu_read_unlock_bh(), rcu_read_unlock_sched() and rcu_head_after_call_rcu() so they e.g. get properly linked in the API documentation.

---
 include/linux/rcupdate.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
include/linux/rcupdate.h +6 -6
index d15d46db61f7..b47d6b66665e 100644
@@ -709,8 +709,8 @@ static inline void rcu_read_lock_bh(void)
 			 "rcu_read_lock_bh() used illegally while idle");
 }
 
-/*
- * rcu_read_unlock_bh - marks the end of a softirq-only RCU critical section
+/**
+ * rcu_read_unlock_bh() - marks the end of a softirq-only RCU critical section
  *
  * See rcu_read_lock_bh() for more information.
  */
@@ -751,10 +751,10 @@ static inline notrace void rcu_read_lock_sched_notrace(void)
 	__acquire(RCU_SCHED);
 }
 
-/*
- * rcu_read_unlock_sched - marks the end of a RCU-classic critical section
+/**
+ * rcu_read_unlock_sched() - marks the end of a RCU-classic critical section
  *
- * See rcu_read_lock_sched for more information.
+ * See rcu_read_lock_sched() for more information.
  */
 static inline void rcu_read_unlock_sched(void)
 {
@@ -945,7 +945,7 @@ static inline void rcu_head_init(struct rcu_head *rhp)
 }
 
 /**
- * rcu_head_after_call_rcu - Has this rcu_head been passed to call_rcu()?
+ * rcu_head_after_call_rcu() - Has this rcu_head been passed to call_rcu()?
  * @rhp: The rcu_head structure to test.
  * @f: The function passed to call_rcu() along with @rhp.
  *
Signature · 1 line
2.27.0
maintainer
#1 lore raw
Quoted 5 lines · Tobias Klauser

Fix the kerneldoc comments for rcu_read_unlock_bh(), rcu_read_unlock_sched() and rcu_head_after_call_rcu() so they e.g. get properly linked in the API documentation.

The addition of the second "*" is clearly needed, good eyes and thank you! But where do these entries link to? As in does adding the "()" link somewhere else, and if so, where? If it instead links to the entry created by the corresponding docbook comment, is that really helpful?

What am I missing here?

Thanx, Paul

Quoted 45 lines
---
 include/linux/rcupdate.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
include/linux/rcupdate.h +6 -6
index d15d46db61f7..b47d6b66665e 100644
@@ -709,8 +709,8 @@ static inline void rcu_read_lock_bh(void)
 			 "rcu_read_lock_bh() used illegally while idle");
 }
 
-/*
- * rcu_read_unlock_bh - marks the end of a softirq-only RCU critical section
+/**
+ * rcu_read_unlock_bh() - marks the end of a softirq-only RCU critical section
  *
  * See rcu_read_lock_bh() for more information.
  */
@@ -751,10 +751,10 @@ static inline notrace void rcu_read_lock_sched_notrace(void)
 	__acquire(RCU_SCHED);
 }
 
-/*
- * rcu_read_unlock_sched - marks the end of a RCU-classic critical section
+/**
+ * rcu_read_unlock_sched() - marks the end of a RCU-classic critical section
  *
- * See rcu_read_lock_sched for more information.
+ * See rcu_read_lock_sched() for more information.
  */
 static inline void rcu_read_unlock_sched(void)
 {
@@ -945,7 +945,7 @@ static inline void rcu_head_init(struct rcu_head *rhp)
 }
 
 /**
- * rcu_head_after_call_rcu - Has this rcu_head been passed to call_rcu()?
+ * rcu_head_after_call_rcu() - Has this rcu_head been passed to call_rcu()?
  * @rhp: The rcu_head structure to test.
  * @f: The function passed to call_rcu() along with @rhp.
  *
Signature · 1 line
2.27.0
#2 lore raw
Quoted 5 lines · Paul E. McKenney
Quoted 4 lines · Tobias Klauser

Fix the kerneldoc comments for rcu_read_unlock_bh(), rcu_read_unlock_sched() and rcu_head_after_call_rcu() so they e.g. get properly linked in the API documentation.

Quoted 8 lines
Quoted 1 line

The addition of the second "*" is clearly needed, good eyes and thank you! But where do these entries link to? As in does adding the "()" link somewhere else, and if so, where? If it instead links to the entry created by the corresponding docbook comment, is that really helpful?

What am I missing here?

Adding the "()" doesn't change anything with regards to whether a link gets created and where it points to, as far as I can tell. I mainly changed these to be consistent with the kerneldoc comments for other functions in the same file, which all use the "()" notation. Sorry, I should have mentioned that in the commit message.

I can drop this part from the patch or send a patch with a revised commit message if you prefer.

Thanks
Tobias

#3 lore raw
In reply to Paul E. McKenney

Hi Paul

Quoted 5 lines · Paul E. McKenney
Quoted 4 lines · Tobias Klauser

Fix the kerneldoc comments for rcu_read_unlock_bh(), rcu_read_unlock_sched() and rcu_head_after_call_rcu() so they e.g. get properly linked in the API documentation.

Quoted 8 lines
Quoted 1 line

The addition of the second "*" is clearly needed, good eyes and thank you! But where do these entries link to? As in does adding the "()" link somewhere else, and if so, where? If it instead links to the entry created by the corresponding docbook comment, is that really helpful?

What am I missing here?

I've sent v2 of the patch [1] which amends the commit message to mention which the "()" were added.

[1] https://lore.kernel.org/rcu/[email protected]/

As noted in the previous message [2], adding the "()" doesn't change anything with regards to whether a link gets created and where it points to. Thus, I mentiond in the v2 commit message that this is only for consistency with kerneldoc comments of other functions in the same file.

[2] https://lore.kernel.org/rcu/[email protected]/

Thanks
Tobias