From: Jonathan Corbet <corbet@lwn.net>
To: Yury Norov <yury.norov@gmail.com>,
Viresh Kumar <viresh.kumar@linaro.org>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>,
Vincent Guittot <vincent.guittot@linaro.org>,
Akira Yokosawa <akiyks@gmail.com>,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
Mauro Carvalho Chehab <mchehab@kernel.org>
Subject: Re: [PATCH V2 1/2] cpumask: Fix kernel-doc formatting errors in cpumask.h
Date: Mon, 10 Mar 2025 08:07:06 -0600 [thread overview]
Message-ID: <87r0350yk5.fsf@trenco.lwn.net> (raw)
In-Reply-To: <Z8snakYmzhaavkKN@thinkpad>
Yury Norov <yury.norov@gmail.com> writes:
> On Fri, Mar 07, 2025 at 01:04:51PM +0530, Viresh Kumar wrote:
>> /**
>> - * cpumask_first_and_and - return the first cpu from *srcp1 & *srcp2 & *srcp3
>> + * cpumask_first_and_and - return the first cpu from *@srcp1 & *@srcp2 & *@srcp3
>> * @srcp1: the first input
>> * @srcp2: the second input
>> * @srcp3: the third input
>> @@ -266,7 +266,7 @@ unsigned int cpumask_any_distribute(const struct cpumask *srcp);
>> #endif /* NR_CPUS */
>>
>> /**
>> - * cpumask_next_and - get the next cpu in *src1p & *src2p
>> + * cpumask_next_and - get the next cpu in *@src1p & *@src2p
>> * @n: the cpu prior to the place to search (i.e. return will be > @n)
>> * @src1p: the first cpumask pointer
>> * @src2p: the second cpumask pointer
>
> So the question: if some word in this particular comment block is
> prefixed with @ symbol, can we teach kernel-doc to consider every
> occurrence of this word as a variable?
>
> Why I'm asking: before the "*src1p & *src2p" was a line of C code.
> And because we are all C programmers here, it's really simple to ident
> it and decode. After it looks like something weird, and I think many
> of us will just mentally skip it.
>
> I like kernel-docs and everything, but again, kernel sources should
> stay readable, and particularly comments should stay human-readable.
I'm sure it *can* be done, yes. In truth, given that we're dealing with
named parameters in a prototype that we are decoding, we might be able,
with enough clever programming, to do away with that markup entirely.
It's just a matter of programming :)
I've added Mauro, since he's in the process of replacing kernel-doc
entirely. I suspect he has enough on his hands at the moment without
adding extra objectives, and will want to get that replacement
successfully done first. But it's a worthy goal to keep in mind.
>> @@ -334,7 +334,8 @@ unsigned int __pure cpumask_next_wrap(int n, const struct cpumask *mask, int sta
>> * @mask1: the first cpumask pointer
>> * @mask2: the second cpumask pointer
>> *
>> - * This saves a temporary CPU mask in many places. It is equivalent to:
>> + * This saves a temporary CPU mask in many places. It is equivalent to::
>> + *
>
> I'm OK with extra line, but this double-colon. What for and what does
> it mean?
The :: introduces a literal block, which needs a blank line to start it.
Thanks,
jon
next prev parent reply other threads:[~2025-03-10 14:07 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-07 7:34 [PATCH V2 0/2] docs: core-api: Update kernel-api.rst to include cpumask.h Viresh Kumar
2025-03-07 7:34 ` [PATCH V2 1/2] cpumask: Fix kernel-doc formatting errors in cpumask.h Viresh Kumar
2025-03-07 9:02 ` Akira Yokosawa
2025-03-07 10:57 ` Akira Yokosawa
2025-03-07 11:28 ` Viresh Kumar
2025-03-07 11:20 ` Akira Yokosawa
2025-03-07 17:05 ` Yury Norov
2025-03-10 6:15 ` Viresh Kumar
2025-03-10 9:03 ` Viresh Kumar
2025-03-10 9:29 ` Akira Yokosawa
2025-03-10 9:11 ` Akira Yokosawa
2025-03-10 14:07 ` Jonathan Corbet [this message]
2025-03-10 14:43 ` Mauro Carvalho Chehab
2025-03-17 9:24 ` Viresh Kumar
2025-03-10 14:53 ` Mauro Carvalho Chehab
2025-03-10 15:27 ` Akira Yokosawa
2025-03-10 15:56 ` Mauro Carvalho Chehab
2025-03-17 8:53 ` Viresh Kumar
2025-03-07 7:34 ` [PATCH V2 2/2] docs: core-api: Update kernel-api.rst to include cpumask.h Viresh Kumar
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=87r0350yk5.fsf@trenco.lwn.net \
--to=corbet@lwn.net \
--cc=akiyks@gmail.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=mchehab@kernel.org \
--cc=vincent.guittot@linaro.org \
--cc=viresh.kumar@linaro.org \
--cc=yury.norov@gmail.com \
/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
all inboxes | Powered by JetHome®