linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rbtree: repair some kernel-doc whining
@ 2021-06-02  6:25 Randy Dunlap
  2021-06-02 20:50 ` Michel Lespinasse
  0 siblings, 1 reply; 2+ messages in thread
From: Randy Dunlap @ 2021-06-02  6:25 UTC (permalink / raw)
  To: linux-kernel
  Cc: Randy Dunlap, Peter Zijlstra, Matthew Wilcox, Michel Lespinasse,
	Davidlohr Bueso

Clean up some kernel-doc warnings and use the documented
Return: notation for function return values.

rbtree_latch.h:64: warning: cannot understand function prototype: 'struct latch_
tree_ops '
rbtree.h:343: warning: Function parameter or member 'node' not described in 'rb_
next_match'
rbtree.h:343: warning: Excess function parameter 'tree' description in 'rb_next_
match'

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Michel Lespinasse <walken@google.com>
Cc: Davidlohr Bueso <dbueso@suse.de>
---
 include/linux/rbtree.h       |   14 +++++++-------
 include/linux/rbtree_latch.h |    2 +-
 2 files changed, 8 insertions(+), 8 deletions(-)

--- linux-next-20210601.orig/include/linux/rbtree_latch.h
+++ linux-next-20210601/include/linux/rbtree_latch.h
@@ -47,7 +47,7 @@ struct latch_tree_root {
 };
 
 /**
- * latch_tree_ops - operators to define the tree order
+ * struct latch_tree_ops - operators to define the tree order
  * @less: used for insertion; provides the (partial) order between two elements.
  * @comp: used for lookups; provides the order between the search key and an element.
  *
--- linux-next-20210601.orig/include/linux/rbtree.h
+++ linux-next-20210601/include/linux/rbtree.h
@@ -186,7 +186,7 @@ static inline void rb_replace_node_cache
  * @tree: leftmost cached tree to insert @node into
  * @less: operator defining the (partial) node order
  *
- * Returns @node when it is the new leftmost, or NULL.
+ * Return: @node when it is the new leftmost, or %NULL.
  */
 static __always_inline struct rb_node *
 rb_add_cached(struct rb_node *node, struct rb_root_cached *tree,
@@ -243,7 +243,7 @@ rb_add(struct rb_node *node, struct rb_r
  * @tree: tree to search / modify
  * @cmp: operator defining the node order
  *
- * Returns the rb_node matching @node, or NULL when no match is found and @node
+ * Return: the rb_node matching @node, or %NULL when no match is found and @node
  * is inserted.
  */
 static __always_inline struct rb_node *
@@ -277,7 +277,7 @@ rb_find_add(struct rb_node *node, struct
  * @tree: tree to search
  * @cmp: operator defining the node order
  *
- * Returns the rb_node matching @key or NULL.
+ * Return: the rb_node matching @key or %NULL.
  */
 static __always_inline struct rb_node *
 rb_find(const void *key, const struct rb_root *tree,
@@ -305,7 +305,7 @@ rb_find(const void *key, const struct rb
  * @tree: tree to search
  * @cmp: operator defining node order
  *
- * Returns the leftmost node matching @key, or NULL.
+ * Return: the leftmost node matching @key, or %NULL.
  */
 static __always_inline struct rb_node *
 rb_find_first(const void *key, const struct rb_root *tree,
@@ -330,12 +330,12 @@ rb_find_first(const void *key, const str
 }
 
 /**
- * rb_next_match() - find the next @key in @tree
+ * rb_next_match() - find the next @key in tree
  * @key: key to match
- * @tree: tree to search
+ * @node: where the previous match was found, then continue searching from here
  * @cmp: operator defining node order
  *
- * Returns the next node matching @key, or NULL.
+ * Return: the next node matching @key, or %NULL.
  */
 static __always_inline struct rb_node *
 rb_next_match(const void *key, struct rb_node *node,

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

* Re: [PATCH] rbtree: repair some kernel-doc whining
  2021-06-02  6:25 [PATCH] rbtree: repair some kernel-doc whining Randy Dunlap
@ 2021-06-02 20:50 ` Michel Lespinasse
  0 siblings, 0 replies; 2+ messages in thread
From: Michel Lespinasse @ 2021-06-02 20:50 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: linux-kernel, Peter Zijlstra, Matthew Wilcox, Michel Lespinasse,
	Davidlohr Bueso

On Tue, Jun 01, 2021 at 11:25:42PM -0700, Randy Dunlap wrote:
> Clean up some kernel-doc warnings and use the documented
> Return: notation for function return values.
> 
> rbtree_latch.h:64: warning: cannot understand function prototype: 'struct latch_
> tree_ops '
> rbtree.h:343: warning: Function parameter or member 'node' not described in 'rb_
> next_match'
> rbtree.h:343: warning: Excess function parameter 'tree' description in 'rb_next_
> match'
> 
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Matthew Wilcox <willy@infradead.org>
> Cc: Michel Lespinasse <walken@google.com>
> Cc: Davidlohr Bueso <dbueso@suse.de>
> ---
>  include/linux/rbtree.h       |   14 +++++++-------
>  include/linux/rbtree_latch.h |    2 +-
>  2 files changed, 8 insertions(+), 8 deletions(-)

Looks fine to me, thanks!

Acked-By: Michel Lespinasse <michel@lespinasse.org>

--
Michel "walken" Lespinasse

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

end of thread, other threads:[~2021-06-02 20:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-02  6:25 [PATCH] rbtree: repair some kernel-doc whining Randy Dunlap
2021-06-02 20:50 ` Michel Lespinasse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).