Re: [PATCH 1/2] fs: eventpoll: fix comments & kernel-doc notation

2021-03-01 Thread Jonathan Corbet
Randy Dunlap  writes:

> Use the documented kernel-doc format for function Return: descriptions.
> Begin constant values in kernel-doc comments with '%'.
>
> Remove kernel-doc "/**" from 2 functions that are not documented with
> kernel-doc notation.
>
> Fix typos, punctuation, & grammar.
>
> Also fix a few kernel-doc warnings:
>
> ../fs/eventpoll.c:1883: warning: Function parameter or member 'ep' not 
> described in 'ep_loop_check_proc'
> ../fs/eventpoll.c:1883: warning: Excess function parameter 'priv' description 
> in 'ep_loop_check_proc'
> ../fs/eventpoll.c:1932: warning: Function parameter or member 'ep' not 
> described in 'ep_loop_check'
> ../fs/eventpoll.c:1932: warning: Excess function parameter 'from' description 
> in 'ep_loop_check'
>
> Signed-off-by: Randy Dunlap 
> Cc: Jonathan Corbet 
> Cc: linux-...@vger.kernel.org
> Cc: Andrew Morton 
> Cc: Alexander Viro 
> ---
> Jon: Al says that he is OK with one of you merging this fs/
>  (only comments) patch.
>
>  fs/eventpoll.c |   52 +++
>  1 file changed, 26 insertions(+), 26 deletions(-)

Both patches applied, thanks.

jon


[PATCH 1/2] fs: eventpoll: fix comments & kernel-doc notation

2021-02-09 Thread Randy Dunlap
Use the documented kernel-doc format for function Return: descriptions.
Begin constant values in kernel-doc comments with '%'.

Remove kernel-doc "/**" from 2 functions that are not documented with
kernel-doc notation.

Fix typos, punctuation, & grammar.

Also fix a few kernel-doc warnings:

../fs/eventpoll.c:1883: warning: Function parameter or member 'ep' not 
described in 'ep_loop_check_proc'
../fs/eventpoll.c:1883: warning: Excess function parameter 'priv' description 
in 'ep_loop_check_proc'
../fs/eventpoll.c:1932: warning: Function parameter or member 'ep' not 
described in 'ep_loop_check'
../fs/eventpoll.c:1932: warning: Excess function parameter 'from' description 
in 'ep_loop_check'

Signed-off-by: Randy Dunlap 
Cc: Jonathan Corbet 
Cc: linux-...@vger.kernel.org
Cc: Andrew Morton 
Cc: Alexander Viro 
---
Jon: Al says that he is OK with one of you merging this fs/
 (only comments) patch.

 fs/eventpoll.c |   52 +++
 1 file changed, 26 insertions(+), 26 deletions(-)

--- linux-next-20210205.orig/fs/eventpoll.c
+++ linux-next-20210205/fs/eventpoll.c
@@ -366,8 +366,8 @@ static inline struct epitem *ep_item_fro
  *
  * @ep: Pointer to the eventpoll context.
  *
- * Returns: Returns a value different than zero if ready events are available,
- *  or zero otherwise.
+ * Return: a value different than %zero if ready events are available,
+ *  or %zero otherwise.
  */
 static inline int ep_events_available(struct eventpoll *ep)
 {
@@ -1023,7 +1023,7 @@ struct file *get_epoll_tfile_raw_ptr(str
 }
 #endif /* CONFIG_CHECKPOINT_RESTORE */
 
-/**
+/*
  * Adds a new entry to the tail of the list in a lockless way, i.e.
  * multiple CPUs are allowed to call this function concurrently.
  *
@@ -1035,10 +1035,10 @@ struct file *get_epoll_tfile_raw_ptr(str
  * completed.
  *
  *Also an element can be locklessly added to the list only in one
- *direction i.e. either to the tail either to the head, otherwise
+ *direction i.e. either to the tail or to the head, otherwise
  *concurrent access will corrupt the list.
  *
- * Returns %false if element has been already added to the list, %true
+ * Return: %false if element has been already added to the list, %true
  * otherwise.
  */
 static inline bool list_add_tail_lockless(struct list_head *new,
@@ -1076,11 +1076,11 @@ static inline bool list_add_tail_lockles
return true;
 }
 
-/**
+/*
  * Chains a new epi entry to the tail of the ep->ovflist in a lockless way,
  * i.e. multiple CPUs are allowed to call this function concurrently.
  *
- * Returns %false if epi element has been already chained, %true otherwise.
+ * Return: %false if epi element has been already chained, %true otherwise.
  */
 static inline bool chain_epi_lockless(struct epitem *epi)
 {
@@ -1105,8 +1105,8 @@ static inline bool chain_epi_lockless(st
  * mechanism. It is called by the stored file descriptors when they
  * have events to report.
  *
- * This callback takes a read lock in order not to content with concurrent
- * events from another file descriptors, thus all modifications to ->rdllist
+ * This callback takes a read lock in order not to contend with concurrent
+ * events from another file descriptor, thus all modifications to ->rdllist
  * or ->ovflist are lockless.  Read lock is paired with the write lock from
  * ep_scan_ready_list(), which stops all list modifications and guarantees
  * that lists state is seen correctly.
@@ -1335,8 +1335,8 @@ static int reverse_path_check_proc(struc
  *  paths such that we will spend all our time waking up
  *  eventpoll objects.
  *
- * Returns: Returns zero if the proposed links don't create too many paths,
- * -1 otherwise.
+ * Return: %zero if the proposed links don't create too many paths,
+ * %-1 otherwise.
  */
 static int reverse_path_check(void)
 {
@@ -1734,7 +1734,7 @@ static struct timespec64 *ep_timeout_to_
 }
 
 /**
- * ep_poll - Retrieves ready events, and delivers them to the caller supplied
+ * ep_poll - Retrieves ready events, and delivers them to the caller-supplied
  *   event buffer.
  *
  * @ep: Pointer to the eventpoll context.
@@ -1747,7 +1747,7 @@ static struct timespec64 *ep_timeout_to_
  *   until at least one event has been retrieved (or an error
  *   occurred).
  *
- * Returns: Returns the number of ready events which have been fetched, or an
+ * Return: the number of ready events which have been fetched, or an
  *  error code, in case of error.
  */
 static int ep_poll(struct eventpoll *ep, struct epoll_event __user *events,
@@ -1774,9 +1774,9 @@ static int ep_poll(struct eventpoll *ep,
 
/*
 * This call is racy: We may or may not see events that are being added
-* to the ready list under the lock (e.g., in IRQ callbacks). For, cases
+* to the ready list under the lock (e.g., in IRQ callbacks). For