Thread (23 messages) 23 messages, 4 authors, 2024-08-28

Re: [PATCH 3/8] regulator: core: Fix incorrectly formatted kerneldoc "Return" sections

From: Chen-Yu Tsai <wenst@chromium.org>
Date: 2024-08-28 08:02:05
Also in: lkml

On Tue, Aug 27, 2024 at 10:42 PM Andy Shevchenko
[off-list ref] wrote:
On Tue, Aug 27, 2024 at 05:55:43PM +0800, Chen-Yu Tsai wrote:
quoted
kernel-doc complains about missing "Return" section for many documented
functions in the regulator core. Many of them actually have descriptions
about the return values, just not in the format kernel-doc wants.

Convert these to use the proper "Return:" section header. The existing
descriptions have been reworded and moved around to fit the grammar and
formatting.

In a few cases where the functions don't call even more functions
and the error numbers are known, those are documented in detail.
...
quoted
+ * Return: pointer the &struct device_node corresponding to the regulator if found,
"pointer to the"
Same elsewhere.
Ack.
quoted
+ *      or %NULL if not found.
...
quoted
+ * Return: pointer to a &struct regulator corresponding to the regulator
+ *      producer, or ERR_PTR() encoded negative error number.
(I'm not sure of definite vs. indefinite article, though. Perhaps you need to
consult with native speaker.)
I think "a" makes more sense, because in the case of _regulator_get(),
the |struct regulator| consumer instances are allocated separately on
the fly for each call.
...
quoted
+ *      producer, or ERR_PTR() encoded negative error number.
Okay, maybe "negative error number" to be used everywhere (see previous email),
the main point is a) to make it clear that it's negative, and b) be consistent
with a term across the subsystem.
Ack.


Thanks
ChenYu
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help