mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chen-Yu Tsai <wenst@chromium.org>
To: Mark Brown <broonie@kernel.org>, Liam Girdwood <lgirdwood@gmail.com>
Cc: Chen-Yu Tsai <wenst@chromium.org>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: [PATCH v2 05/10] regulator: of: Fix incorrectly formatted kerneldoc "Return" sections
Date: Thu, 29 Aug 2024 16:51:25 +0800	[thread overview]
Message-ID: <20240829085131.1361701-6-wenst@chromium.org> (raw)
In-Reply-To: <20240829085131.1361701-1-wenst@chromium.org>

kernel-doc complains about missing "Return" section for many documented
functions in the regulator OF-specific code. These all 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.

Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
---
Changes since v1:
- Capitalized first word of first sentence in "Return" section
- Added articles ("the", "a") to the description based on surrounding
  and function implementation context
- s/alloc/allocation/
- s/error code/error number/
---
 drivers/regulator/of_regulator.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/drivers/regulator/of_regulator.c b/drivers/regulator/of_regulator.c
index d557f7b1ec7c..dfa9f42d4629 100644
--- a/drivers/regulator/of_regulator.c
+++ b/drivers/regulator/of_regulator.c
@@ -338,8 +338,10 @@ static int of_get_regulation_constraints(struct device *dev,
  * @desc: regulator description
  *
  * Populates regulator_init_data structure by extracting data from device
- * tree node, returns a pointer to the populated structure or NULL if memory
- * alloc fails.
+ * tree node.
+ *
+ * Return: Pointer to a populated &struct regulator_init_data or NULL if
+ *	   memory allocation fails.
  */
 struct regulator_init_data *of_get_regulator_init_data(struct device *dev,
 					  struct device_node *node,
@@ -391,7 +393,7 @@ static void devm_of_regulator_put_matches(struct device *dev, void *res)
  * in place and an additional of_node reference is taken for each matched
  * regulator.
  *
- * Returns the number of matches found or a negative error code on failure.
+ * Return: The number of matches found or a negative error number on failure.
  */
 int of_regulator_match(struct device *dev, struct device_node *node,
 		       struct of_regulator_match *matches,
@@ -619,7 +621,7 @@ static bool of_coupling_find_node(struct device_node *src,
  * - all coupled regulators have the same number of regulator_dev phandles
  * - all regulators are linked to each other
  *
- * Returns true if all conditions are met.
+ * Return: True if all conditions are met; false otherwise.
  */
 bool of_check_coupling_data(struct regulator_dev *rdev)
 {
@@ -690,8 +692,8 @@ bool of_check_coupling_data(struct regulator_dev *rdev)
  *	  "regulator-coupled-with" property
  * @index: Index in phandles array
  *
- * Returns the regulator_dev pointer parsed from DTS. If it has not been yet
- * registered, returns NULL
+ * Return: Pointer to the &struct regulator_dev parsed from DTS, or %NULL if
+ *	   it has not yet been registered.
  */
 struct regulator_dev *of_parse_coupled_regulator(struct regulator_dev *rdev,
 						 int index)
-- 
2.46.0.295.g3b9ea8a38a-goog


  parent reply	other threads:[~2024-08-29  8:51 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-29  8:51 [PATCH v2 00/10] regulator: kerneldoc section fixes Chen-Yu Tsai
2024-08-29  8:51 ` [PATCH v2 01/10] regulator: core: Fix short description for _regulator_check_status_enabled() Chen-Yu Tsai
2024-08-29  8:51 ` [PATCH v2 02/10] regulator: core: Fix regulator_is_supported_voltage() kerneldoc return value Chen-Yu Tsai
2024-08-29 12:46   ` Andy Shevchenko
2024-08-29 22:59     ` Chen-Yu Tsai
2024-08-29  8:51 ` [PATCH v2 03/10] regulator: core: Fix incorrectly formatted kerneldoc "Return" sections Chen-Yu Tsai
2024-08-29  8:51 ` [PATCH v2 04/10] regulator: core: Add missing " Chen-Yu Tsai
2024-08-29  8:51 ` Chen-Yu Tsai [this message]
2024-08-29 12:48   ` [PATCH v2 05/10] regulator: of: Fix incorrectly formatted " Andy Shevchenko
2024-08-29  8:51 ` [PATCH v2 06/10] regulator: fixed: Fix incorrectly formatted kerneldoc "Return" section Chen-Yu Tsai
2024-08-29  8:51 ` [PATCH v2 07/10] regulator: fixed-helper: Add missing "Return" kerneldoc section Chen-Yu Tsai
2024-08-29  8:51 ` [PATCH v2 08/10] regulator: irq_helpers: Fix regulator_irq_map_event_simple() kerneldoc Chen-Yu Tsai
2024-08-29 12:49   ` Andy Shevchenko
2024-08-29  8:51 ` [PATCH v2 09/10] regulator: of: Fix kerneldoc format for of_regulator_bulk_get_all() Chen-Yu Tsai
2024-08-29  8:51 ` [PATCH v2 10/10] regulator: Unify "negative error number" terminology in comments Chen-Yu Tsai
2024-08-29 12:54 ` [PATCH v2 00/10] regulator: kerneldoc section fixes Andy Shevchenko
2024-08-29 16:07 ` Mark Brown

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=20240829085131.1361701-6-wenst@chromium.org \
    --to=wenst@chromium.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    /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®