[PATCH 3/8] regulator: core: Fix incorrectly formatted kerneldoc "Return" sections
Chen-Yu Tsai
wenst at chromium.org
Wed Aug 28 01:01:52 PDT 2024
On Tue, Aug 27, 2024 at 10:42 PM Andy Shevchenko
<andriy.shevchenko at linux.intel.com> wrote:
>
> On Tue, Aug 27, 2024 at 05:55:43PM +0800, Chen-Yu Tsai wrote:
> > 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.
>
> ...
>
> > + * Return: pointer the &struct device_node corresponding to the regulator if found,
>
> "pointer to the"
> Same elsewhere.
Ack.
> > + * or %NULL if not found.
>
> ...
>
> > + * 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.
> ...
>
> > + * 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
More information about the linux-arm-kernel
mailing list