From: Lorenzo Stoakes <ljs@kernel.org>
To: Alexander Lechthaler <alexander@lechthaler.online>
Cc: arnd@arndb.de, david@kernel.org, linux-kernel@vger.kernel.org,
Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH] ipc/sem: fix malformed kernel-doc comment
Date: Tue, 26 May 2026 09:08:47 +0100 [thread overview]
Message-ID: <ahVUrR8CeFlZXfL-@lucifer> (raw)
In-Reply-To: <20260522190507.97175-1-alexander@lechthaler.online>
+cc Jon, Shuah from documentation side
On Fri, May 22, 2026 at 09:05:07PM +0200, Alexander Lechthaler wrote:
> 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>
This LGTM, though I wonder if that 'Returns' syntax is right. But either way
seems fine so:
Acked-by: Lorenzo Stoakes <ljs@kernel.org>
> ---
> 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
>
prev parent reply other threads:[~2026-05-26 8:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-22 19:05 [PATCH] ipc/sem: fix malformed kernel-doc comment Alexander Lechthaler
2026-05-26 8:08 ` Lorenzo Stoakes [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ahVUrR8CeFlZXfL-@lucifer \
--to=ljs@kernel.org \
--cc=alexander@lechthaler.online \
--cc=arnd@arndb.de \
--cc=corbet@lwn.net \
--cc=david@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=skhan@linuxfoundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox