diff mbox series

[1/5] core: fix doc comments of dev_read_addr*() and related functions

Message ID 78309a6288060d9883de9f1406a2d81c4ca3904f.1695817360.git.matthias.schiffer@ew.tq-group.com
State Accepted
Commit e42c4d6d90c60f6b7fe01e88f458782c42cee8c9
Delegated to: Simon Glass
Headers show
Series [1/5] core: fix doc comments of dev_read_addr*() and related functions | expand

Commit Message

Matthias Schiffer Sept. 27, 2023, 1:33 p.m. UTC
- The dev_read_addr_name*() family of functions has no "index" argument,
  doc comments should refer to "name"
- Specify the error return for several devfdt_get_addr*() functions

Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
---
 include/dm/fdtaddr.h | 12 ++++++------
 include/dm/read.h    |  6 +++---
 2 files changed, 9 insertions(+), 9 deletions(-)

Comments

Simon Glass Oct. 2, 2023, 1:16 a.m. UTC | #1
On Wed, 27 Sept 2023 at 07:34, Matthias Schiffer
<matthias.schiffer@ew.tq-group.com> wrote:
>
> - The dev_read_addr_name*() family of functions has no "index" argument,
>   doc comments should refer to "name"
> - Specify the error return for several devfdt_get_addr*() functions
>
> Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
> ---
>  include/dm/fdtaddr.h | 12 ++++++------
>  include/dm/read.h    |  6 +++---
>  2 files changed, 9 insertions(+), 9 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>
Simon Glass Oct. 13, 2023, 10 p.m. UTC | #2
On Wed, 27 Sept 2023 at 07:34, Matthias Schiffer
<matthias.schiffer@ew.tq-group.com> wrote:
>
> - The dev_read_addr_name*() family of functions has no "index" argument,
>   doc comments should refer to "name"
> - Specify the error return for several devfdt_get_addr*() functions
>
> Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
> ---
>  include/dm/fdtaddr.h | 12 ++++++------
>  include/dm/read.h    |  6 +++---
>  2 files changed, 9 insertions(+), 9 deletions(-)

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

Applied to u-boot-dm, thanks!
diff mbox series

Patch

diff --git a/include/dm/fdtaddr.h b/include/dm/fdtaddr.h
index dcdc19137cc..ca788dccb39 100644
--- a/include/dm/fdtaddr.h
+++ b/include/dm/fdtaddr.h
@@ -19,7 +19,7 @@  struct udevice;
  *
  * @dev: Pointer to a device
  *
- * Return: addr
+ * Return: Address, or FDT_ADDR_T_NONE if there is no such property
  */
 fdt_addr_t devfdt_get_addr(const struct udevice *dev);
 
@@ -59,7 +59,7 @@  void *devfdt_remap_addr_index(const struct udevice *dev, int index);
  * devfdt_remap_addr_name() - Get the reg property of a device, indexed by
  *                            name, as a memory-mapped I/O pointer
  * @name: the 'reg' property can hold a list of <addr, size> pairs, with the
- *	  'reg-names' property providing named-based identification. @index
+ *	  'reg-names' property providing named-based identification. @name
  *	  indicates the value to search for in 'reg-names'.
  *
  * @dev: Pointer to a device
@@ -87,7 +87,7 @@  void *devfdt_map_physmem(const struct udevice *dev, unsigned long size);
  * @index: the 'reg' property can hold a list of <addr, size> pairs
  *	   and @index is used to select which one is required
  *
- * Return: addr
+ * Return: Address, or FDT_ADDR_T_NONE if there is no such property
  */
 fdt_addr_t devfdt_get_addr_index(const struct udevice *dev, int index);
 
@@ -114,7 +114,7 @@  void *devfdt_get_addr_index_ptr(const struct udevice *dev, int index);
  * @size: Pointer to size variable - this function returns the size
  *        specified in the 'reg' property here
  *
- * Return: addr
+ * Return: Address, or FDT_ADDR_T_NONE if there is no such property
  */
 fdt_addr_t devfdt_get_addr_size_index(const struct udevice *dev, int index,
 				      fdt_size_t *size);
@@ -139,7 +139,7 @@  void *devfdt_get_addr_size_index_ptr(const struct udevice *dev, int index,
  *
  * @dev: Pointer to a device
  * @name: the 'reg' property can hold a list of <addr, size> pairs, with the
- *	  'reg-names' property providing named-based identification. @index
+ *	  'reg-names' property providing named-based identification. @name
  *	  indicates the value to search for in 'reg-names'.
  *
  * Return: addr
@@ -154,7 +154,7 @@  fdt_addr_t devfdt_get_addr_name(const struct udevice *dev, const char *name);
  *
  * @dev: Pointer to a device
  * @name: the 'reg' property can hold a list of <addr, size> pairs, with the
- *	  'reg-names' property providing named-based identification. @index
+ *	  'reg-names' property providing named-based identification. @name
  *	  indicates the value to search for in 'reg-names'.
  * @size: Pointer to size variable - this function returns the size
  *        specified in the 'reg' property here
diff --git a/include/dm/read.h b/include/dm/read.h
index c2615f72f40..da7732a170f 100644
--- a/include/dm/read.h
+++ b/include/dm/read.h
@@ -277,7 +277,7 @@  void *dev_remap_addr_index(const struct udevice *dev, int index);
  *
  * @dev: Device to read from
  * @name: the 'reg' property can hold a list of <addr, size> pairs, with the
- *	  'reg-names' property providing named-based identification. @index
+ *	  'reg-names' property providing named-based identification. @name
  *	  indicates the value to search for in 'reg-names'.
  *
  * Return: address or FDT_ADDR_T_NONE if not found
@@ -289,7 +289,7 @@  fdt_addr_t dev_read_addr_name(const struct udevice *dev, const char *name);
  *
  * @dev: Device to read from
  * @name: the 'reg' property can hold a list of <addr, size> pairs, with the
- *	  'reg-names' property providing named-based identification. @index
+ *	  'reg-names' property providing named-based identification. @name
  *	  indicates the value to search for in 'reg-names'.
  *  @size: place to put size value (on success)
  *
@@ -304,7 +304,7 @@  fdt_addr_t dev_read_addr_size_name(const struct udevice *dev, const char *name,
  *
  * @dev: Device to read from
  * @name: the 'reg' property can hold a list of <addr, size> pairs, with the
- *	  'reg-names' property providing named-based identification. @index
+ *	  'reg-names' property providing named-based identification. @name
  *	  indicates the value to search for in 'reg-names'.
  *
  * Return: pointer or NULL if not found