All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ipc/sem: fix malformed kernel-doc comment
@ 2026-05-22 19:05 Alexander Lechthaler
  2026-05-26  8:08 ` Lorenzo Stoakes
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Lechthaler @ 2026-05-22 19:05 UTC (permalink / raw)
  To: arnd, david, ljs; +Cc: linux-kernel, Alexander Lechthaler

perform_atomic_semop[_slow]() uses unsupported kernel-doc syntax,
triggering a warning:

  This comment starts with '/**', but isn't a kernel-doc comment

Split the shared comment into separate kernel-doc blocks for
perform_atomic_semop() and perform_atomic_semop_slow().

No functional change.

Signed-off-by: Alexander Lechthaler <alexander@lechthaler.online>
---
 ipc/sem.c | 21 +++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)

diff --git a/ipc/sem.c b/ipc/sem.c
index 6cdf862b1f5c..fde2bcc225dc 100644
--- a/ipc/sem.c
+++ b/ipc/sem.c
@@ -627,8 +627,8 @@ SYSCALL_DEFINE3(semget, key_t, key, int, nsems, int, semflg)
 }
 
 /**
- * perform_atomic_semop[_slow] - Attempt to perform semaphore
- *                               operations on a given array.
+ * perform_atomic_semop_slow - Attempt to perform semaphore
+ *                             operations on a given array.
  * @sma: semaphore array
  * @q: struct sem_queue that describes the operation
  *
@@ -716,6 +716,23 @@ static int perform_atomic_semop_slow(struct sem_array *sma, struct sem_queue *q)
 	return result;
 }
 
+/**
+ * perform_atomic_semop - Attempt to perform semaphore
+ *                        operations on a given array.
+ * @sma: semaphore array
+ * @q: struct sem_queue that describes the operation
+ *
+ * Caller blocking are as follows, based the value
+ * indicated by the semaphore operation (sem_op):
+ *
+ *  (1) >0 never blocks.
+ *  (2)  0 (wait-for-zero operation): semval is non-zero.
+ *  (3) <0 attempting to decrement semval to a value smaller than zero.
+ *
+ * Returns 0 if the operation was possible.
+ * Returns 1 if the operation is impossible, the caller must sleep.
+ * Returns <0 for error codes.
+ */
 static int perform_atomic_semop(struct sem_array *sma, struct sem_queue *q)
 {
 	int result, sem_op, nsops;
-- 
2.43.0


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

end of thread, other threads:[~2026-05-26  8:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-22 19:05 [PATCH] ipc/sem: fix malformed kernel-doc comment Alexander Lechthaler
2026-05-26  8:08 ` Lorenzo Stoakes

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.