diff mbox series

[v2,08/10] regulator: irq_helpers: Fix regulator_irq_map_event_simple() kerneldoc

Message ID 20240829085131.1361701-9-wenst@chromium.org (mailing list archive)
State Accepted, archived
Headers show
Series regulator: kerneldoc section fixes | expand

Commit Message

Chen-Yu Tsai Aug. 29, 2024, 8:51 a.m. UTC
kernel-doc complains about missing "Return" section for the function
regulator_irq_map_event_simple().

Add a "Return" section for it based on its behavior. The function
actually always returns 0, but fills in fields in its @rid parameter as
needed. Expand the description of the parameter to cover this.

While at it fix a typo found in the description of the same function.

Reported-by: Matti Vaittinen <mazziesaccount@gmail.com>
Closes: https://lore.kernel.org/all/e341240e-1c1f-49a2-91cd-440888fdbda0@gmail.com/
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>

---
Changes since v1:
- Update commit subject to reflect changes
  - Was 'regulator: irq_helpers: Add missing "Return" kerneldoc section'
- Add period ('.') to the end of the "Return" section sentence
- Fix typo in function description spotted by Marti
- Describe output fields in @rid clearly
---
 drivers/regulator/irq_helpers.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

Comments

Andy Shevchenko Aug. 29, 2024, 12:49 p.m. UTC | #1
On Thu, Aug 29, 2024 at 04:51:28PM +0800, Chen-Yu Tsai wrote:
> kernel-doc complains about missing "Return" section for the function
> regulator_irq_map_event_simple().
> 
> Add a "Return" section for it based on its behavior. The function
> actually always returns 0, but fills in fields in its @rid parameter as
> needed. Expand the description of the parameter to cover this.
> 
> While at it fix a typo found in the description of the same function.
> 
> Reported-by: Matti Vaittinen <mazziesaccount@gmail.com>
> Closes: https://lore.kernel.org/all/e341240e-1c1f-49a2-91cd-440888fdbda0@gmail.com/

Fixes?

> Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
diff mbox series

Patch

diff --git a/drivers/regulator/irq_helpers.c b/drivers/regulator/irq_helpers.c
index 5ab1a0befe12..2de7b907c81d 100644
--- a/drivers/regulator/irq_helpers.c
+++ b/drivers/regulator/irq_helpers.c
@@ -404,16 +404,21 @@  EXPORT_SYMBOL_GPL(regulator_irq_helper_cancel);
 /**
  * regulator_irq_map_event_simple - regulator IRQ notification for trivial IRQs
  *
- * @irq:	Number of IRQ that occurred
- * @rid:	Information about the event IRQ indicates
- * @dev_mask:	mask indicating the regulator originating the IRQ
+ * @irq:	Number of IRQ that occurred.
+ * @rid:	Information about the event IRQ indicates.
+ *		The function fills in the &regulator_err_state->notifs
+ *		and &regulator_err_state->errors fields of
+ *		&regulator_irq_data->states as output.
+ * @dev_mask:	mask indicating the regulator originating the IRQ.
  *
  * Regulators whose IRQ has single, well defined purpose (always indicate
  * exactly one event, and are relevant to exactly one regulator device) can
- * use this function as their map_event callbac for their regulator IRQ
- * notification helperk. Exactly one rdev and exactly one error (in
+ * use this function as their map_event callback for their regulator IRQ
+ * notification helper. Exactly one rdev and exactly one error (in
  * "common_errs"-field) can be given at IRQ helper registration for
  * regulator_irq_map_event_simple() to be viable.
+ *
+ * Return: 0.
  */
 int regulator_irq_map_event_simple(int irq, struct regulator_irq_data *rid,
 			    unsigned long *dev_mask)