Thread (17 messages) 17 messages, 3 authors, 2024-08-29

Re: [PATCH v2 02/10] regulator: core: Fix regulator_is_supported_voltage() kerneldoc return value

From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date: 2024-08-29 12:46:53
Also in: lkml

On Thu, Aug 29, 2024 at 04:51:22PM +0800, Chen-Yu Tsai wrote:
The kerneldoc for regulator_is_supported_voltage() states that the
return value is a boolean. That is not correct, as it could return an
error number if the check failed.

Fix the description by expanding it to cover the valid return values and
error conditions. The description is also converted to a proper "Return"
section.
...
- * Returns a boolean.
+ * Return: 1 if the voltage range is supported, 0 if not, or a negative error
+ *	   number if @regulator's voltage can't be changed and voltage readback
+ *	   failed.
Not sure why you have TABs in the following lines, but I think you have checked
the rendered files (html, man, pdf) and all look good.

Alternatively it might be written as

 * Return:
 * 1 if the voltage range is supported, 0 if not, or a negative error number
 * if @regulator's voltage can't be changed and voltage readback failed.

which should be the same in the render.

(Also similar applies to the other patch(es))

-- 
With Best Regards,
Andy Shevchenko


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