public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: U-Boot Mailing List <u-boot@lists.denx.de>
Cc: Tom Rini <trini@konsulko.com>, Simon Glass <sjg@chromium.org>,
	Marek Vasut <marex@denx.de>,
	Pavel Herrmann <morpheus.ibis@gmail.com>
Subject: [PATCH 17/18] dm: core: Tidy up comments in uclass headers
Date: Mon, 28 Feb 2022 12:08:34 -0700	[thread overview]
Message-ID: <20220228190835.1480772-18-sjg@chromium.org> (raw)
In-Reply-To: <20220228190835.1480772-1-sjg@chromium.org>

Improve some of the comments in these files, which don't follow the
correct style.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 include/dm/uclass-internal.h | 18 +++++++++---------
 include/dm/uclass.h          | 13 ++++++-------
 2 files changed, 15 insertions(+), 16 deletions(-)

diff --git a/include/dm/uclass-internal.h b/include/dm/uclass-internal.h
index e71b86a973..daf856c03c 100644
--- a/include/dm/uclass-internal.h
+++ b/include/dm/uclass-internal.h
@@ -55,7 +55,7 @@
  *
  * @_name: Name of the uclass. This must be a valid C identifier, used by the
  *	linker_list
- * @returns struct uclass * for the device
+ * Return: struct uclass * for the device
  */
 #define DM_UCLASS_REF(_name)						\
 	ll_entry_ref(struct uclass, _name, uclass)
@@ -120,7 +120,7 @@ int dev_get_uclass_index(struct udevice *dev, struct uclass **ucp);
  * uclass_find_device() - Return n-th child of uclass
  * @id:		Id number of the uclass
  * @index:	Position of the child in uclass's list
- * #devp:	Returns pointer to device, or NULL on error
+ * @devp:	Returns pointer to device, or NULL on error
  *
  * The device is not prepared for use - this is an internal function.
  * The function uclass_get_device_tail() can be used to probe the device.
@@ -133,7 +133,7 @@ int uclass_find_device(enum uclass_id id, int index, struct udevice **devp);
 /**
  * uclass_find_first_device() - Return the first device in a uclass
  * @id:		Id number of the uclass
- * #devp:	Returns pointer to device, or NULL on error
+ * @devp:	Returns pointer to device, or NULL on error
  *
  * The device is not prepared for use - this is an internal function.
  * The function uclass_get_device_tail() can be used to probe the device.
@@ -239,7 +239,7 @@ int uclass_find_device_by_phandle(enum uclass_id id, struct udevice *parent,
  * Connect the device into uclass's list of devices.
  *
  * @dev:	Pointer to the device
- * #return 0 on success, -ve on error
+ * Return: 0 on success, -ve on error
  */
 int uclass_bind_device(struct udevice *dev);
 
@@ -250,7 +250,7 @@ int uclass_bind_device(struct udevice *dev);
  * Call any handled needed before uclass_unbind_device() is called
  *
  * @dev:	Pointer to the device
- * #return 0 on success, -ve on error
+ * Return: 0 on success, -ve on error
  */
 int uclass_pre_unbind_device(struct udevice *dev);
 
@@ -260,7 +260,7 @@ int uclass_pre_unbind_device(struct udevice *dev);
  * Disconnect the device from uclass's list of devices.
  *
  * @dev:	Pointer to the device
- * #return 0 on success, -ve on error
+ * Return: 0 on success, -ve on error
  */
 int uclass_unbind_device(struct udevice *dev);
 
@@ -277,7 +277,7 @@ static inline int uclass_unbind_device(struct udevice *dev) { return 0; }
  * uclass' child_pre_probe() method.
  *
  * @dev:	Pointer to the device
- * #return 0 on success, -ve on error
+ * Return: 0 on success, -ve on error
  */
 int uclass_pre_probe_device(struct udevice *dev);
 
@@ -288,7 +288,7 @@ int uclass_pre_probe_device(struct udevice *dev);
  * uclass.
  *
  * @dev:	Pointer to the device
- * #return 0 on success, -ve on error
+ * Return: 0 on success, -ve on error
  */
 int uclass_post_probe_device(struct udevice *dev);
 
@@ -298,7 +298,7 @@ int uclass_post_probe_device(struct udevice *dev);
  * Perform any pre-processing of a device that is about to be removed.
  *
  * @dev:	Pointer to the device
- * #return 0 on success, -ve on error
+ * Return: 0 on success, -ve on error
  */
 #if CONFIG_IS_ENABLED(DM_DEVICE_REMOVE)
 int uclass_pre_remove_device(struct udevice *dev);
diff --git a/include/dm/uclass.h b/include/dm/uclass.h
index 7f33c34214..aafe652288 100644
--- a/include/dm/uclass.h
+++ b/include/dm/uclass.h
@@ -435,7 +435,7 @@ int uclass_probe_all(enum uclass_id id);
 int uclass_id_count(enum uclass_id id);
 
 /**
- * uclass_id_foreach_dev() - Helper function to iteration through devices
+ * uclass_id_foreach_dev() - iterate through devices of a given uclass ID
  *
  * This creates a for() loop which works through the available devices in
  * a uclass ID in order from start to end.
@@ -452,20 +452,20 @@ int uclass_id_count(enum uclass_id id);
 		list_for_each_entry(pos, &uc->dev_head, uclass_node)
 
 /**
- * uclass_foreach_dev() - Helper function to iteration through devices
+ * uclass_foreach_dev() - iterate through devices of a given uclass
  *
  * This creates a for() loop which works through the available devices in
  * a uclass in order from start to end.
  *
  * @pos: struct udevice * to hold the current device. Set to NULL when there
  * are no more devices.
- * @uc: uclass to scan
+ * @uc: uclass to scan (`struct uclass *`)
  */
 #define uclass_foreach_dev(pos, uc)	\
 	list_for_each_entry(pos, &uc->dev_head, uclass_node)
 
 /**
- * uclass_foreach_dev_safe() - Helper function to safely iteration through devs
+ * uclass_foreach_dev_safe() - safely iterate through devices of a given uclass
  *
  * This creates a for() loop which works through the available devices in
  * a uclass in order from start to end. Inside the loop, it is safe to remove
@@ -474,14 +474,13 @@ int uclass_id_count(enum uclass_id id);
  * @pos: struct udevice * to hold the current device. Set to NULL when there
  * are no more devices.
  * @next: struct udevice * to hold the next next
- * @uc: uclass to scan
+ * @uc: uclass to scan (`struct uclass *`)
  */
 #define uclass_foreach_dev_safe(pos, next, uc)	\
 	list_for_each_entry_safe(pos, next, &uc->dev_head, uclass_node)
 
 /**
- * uclass_foreach_dev_probe() - Helper function to iteration through devices
- * of given uclass
+ * uclass_foreach_dev_probe() - iterate through devices of a given uclass ID
  *
  * This creates a for() loop which works through the available devices in
  * a uclass in order from start to end. Devices are probed if necessary,
-- 
2.35.1.574.g5d30c73bfb-goog


  parent reply	other threads:[~2022-02-28 19:12 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-28 19:08 [PATCH 00/18] Various bugfixes related to verified boot Simon Glass
2022-02-28 19:08 ` [PATCH 01/18] buildman: Update default config to build for sandbox Simon Glass
2022-04-07 13:50   ` Tom Rini
2022-02-28 19:08 ` [PATCH 02/18] buildman: Fix up cfgutil Simon Glass
2022-02-28 19:08 ` [PATCH 03/18] binman: Correct Chromium OS entry types Simon Glass
2022-02-28 19:08 ` [PATCH 04/18] errno: Avoid including strings in SPL Simon Glass
2022-02-28 19:08 ` [PATCH 05/18] abuf: Correct a corner case with abuf_realloc() Simon Glass
2022-02-28 19:08 ` [PATCH 06/18] fdt: Correct condition for SEPARATE_BSS Simon Glass
2022-02-28 19:08 ` [PATCH 07/18] fdt: sandbox: Avoid looking for an appended device tree Simon Glass
2022-02-28 19:08 ` [PATCH 08/18] lzma: Tidy up the function prototype Simon Glass
2022-02-28 19:08 ` [PATCH 09/18] cbfs: Add some more definititions Simon Glass
2022-02-28 19:08 ` [PATCH 10/18] cros_ec: Complete the comment for cros_ec_read_batt_charge() Simon Glass
2022-02-28 19:08 ` [PATCH 11/18] spi: Avoid checking console in SPL Simon Glass
2022-02-28 19:08 ` [PATCH 12/18] disk: Correct the conditions for SPL Simon Glass
2022-02-28 19:08 ` [PATCH 13/18] Add a default for TPL_TEXT_BASE Simon Glass
2022-02-28 19:08 ` [PATCH 14/18] Make ASYMMETRIC_KEY_TYPE depend on FIT_SIGNATURE Simon Glass
2022-03-01  4:22   ` AKASHI Takahiro
2022-03-12  2:25     ` Simon Glass
2022-03-14  1:59       ` AKASHI Takahiro
2022-02-28 19:08 ` [PATCH 15/18] stdint: Add a definition of UINT8_MAX Simon Glass
2022-02-28 19:08 ` [PATCH 16/18] dm: core: Add a required struct declaration Simon Glass
2022-02-28 19:08 ` Simon Glass [this message]
2022-02-28 19:08 ` [PATCH 18/18] dm: blk: Expand iteration and add tests Simon Glass

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=20220228190835.1480772-18-sjg@chromium.org \
    --to=sjg@chromium.org \
    --cc=marex@denx.de \
    --cc=morpheus.ibis@gmail.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /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