doc: replace @return by Return:
Sphinx expects Return: and not @return to indicate a return value.
find . -name '*.c' -exec \
sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \;
find . -name '*.h' -exec \
sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \;
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
diff --git a/include/dm/acpi.h b/include/dm/acpi.h
index 7f1f2ef..0fa239e 100644
--- a/include/dm/acpi.h
+++ b/include/dm/acpi.h
@@ -139,7 +139,7 @@
* @dev: Device to check
* @out_name: Place to put the name, must hold at least ACPI_NAME_MAX
* bytes
- * @return 0 if OK, -ENOENT if no name is available, other -ve value on
+ * Return: 0 if OK, -ENOENT if no name is available, other -ve value on
* other error
*/
int acpi_get_name(const struct udevice *dev, char *out_name);
@@ -159,7 +159,7 @@
*
* @out_name: Place to put the name
* @name: Name to copy
- * @return 0 (always)
+ * Return: 0 (always)
*/
int acpi_copy_name(char *out_name, const char *name);
@@ -169,7 +169,7 @@
* This scans through all devices and tells them to write any tables they want
* to write.
*
- * @return 0 if OK, -ve if any device returned an error
+ * Return: 0 if OK, -ve if any device returned an error
*/
int acpi_write_dev_tables(struct acpi_ctx *ctx);
@@ -179,7 +179,7 @@
* This is called to create the SSDT code for all devices.
*
* @ctx: ACPI context to use
- * @return 0 if OK, -ve on error
+ * Return: 0 if OK, -ve on error
*/
int acpi_fill_ssdt(struct acpi_ctx *ctx);
@@ -189,7 +189,7 @@
* This is called to create the DSDT code for all devices.
*
* @ctx: ACPI context to use
- * @return 0 if OK, -ve on error
+ * Return: 0 if OK, -ve on error
*/
int acpi_inject_dsdt(struct acpi_ctx *ctx);
@@ -200,7 +200,7 @@
*
* @ctx: ACPI context to use
* @nhlt: Pointer to nhlt information to add to
- * @return 0 if OK, -ve on error
+ * Return: 0 if OK, -ve on error
*/
int acpi_setup_nhlt(struct acpi_ctx *ctx, struct nhlt *nhlt);
@@ -223,7 +223,7 @@
* @dev: Device to check
* @out_path: Buffer to place the path in (should be ACPI_PATH_MAX long)
* @maxlen: Size of buffer (typically ACPI_PATH_MAX)
- * @return 0 if OK, -ve on error
+ * Return: 0 if OK, -ve on error
*/
int acpi_get_path(const struct udevice *dev, char *out_path, int maxlen);
diff --git a/include/dm/device-internal.h b/include/dm/device-internal.h
index e6b71cb..02002ac 100644
--- a/include/dm/device-internal.h
+++ b/include/dm/device-internal.h
@@ -109,7 +109,7 @@
* @ofnode: Devicetree node for this device. This is ofnode_null() for
* devices which don't use devicetree or don't have a node.
* @devp: if non-NULL, returns a pointer to the bound device
- * @return 0 if OK, -ve on error
+ * Return: 0 if OK, -ve on error
*/
int device_bind(struct udevice *parent, const struct driver *drv,
const char *name, void *plat, ofnode node,
@@ -132,7 +132,7 @@
* @node: Device tree node for this device. This is invalid for devices which
* don't use device tree.
* @devp: if non-NULL, returns a pointer to the bound device
- * @return 0 if OK, -ve on error
+ * Return: 0 if OK, -ve on error
*/
int device_bind_with_driver_data(struct udevice *parent,
const struct driver *drv, const char *name,
@@ -149,7 +149,7 @@
* is set. If false bind the driver always.
* @info: Name and plat for this device
* @devp: if non-NULL, returns a pointer to the bound device
- * @return 0 if OK, -ve on error
+ * Return: 0 if OK, -ve on error
*/
int device_bind_by_name(struct udevice *parent, bool pre_reloc_only,
const struct driver_info *info, struct udevice **devp);
@@ -159,7 +159,7 @@
*
* @dev: pointer to device to be reparented
* @new_parent: pointer to new parent device
- * @return 0 if OK, -ve on error
+ * Return: 0 if OK, -ve on error
*/
int device_reparent(struct udevice *dev, struct udevice *new_parent);
@@ -175,7 +175,7 @@
* All private data associated with the device is allocated.
*
* @dev: Pointer to device to process
- * @return 0 if OK, -ve on error
+ * Return: 0 if OK, -ve on error
*/
int device_of_to_plat(struct udevice *dev);
@@ -186,7 +186,7 @@
* first.
*
* @dev: Pointer to device to probe
- * @return 0 if OK, -ve on error
+ * Return: 0 if OK, -ve on error
*/
int device_probe(struct udevice *dev);
@@ -198,7 +198,7 @@
*
* @dev: Pointer to device to remove
* @flags: Flags for selective device removal (DM_REMOVE_...)
- * @return 0 if OK, -EKEYREJECTED if not removed due to flags, -EPROBE_DEFER if
+ * Return: 0 if OK, -EKEYREJECTED if not removed due to flags, -EPROBE_DEFER if
* this is a vital device and flags is DM_REMOVE_NON_VITAL, other -ve on
* error (such an error here is normally a very bad thing)
*/
@@ -214,7 +214,7 @@
* Unbind a device and remove all memory used by it
*
* @dev: Pointer to device to unbind
- * @return 0 if OK, -ve on error
+ * Return: 0 if OK, -ve on error
*/
#if CONFIG_IS_ENABLED(DM_DEVICE_REMOVE)
int device_unbind(struct udevice *dev);
@@ -237,7 +237,7 @@
*
* @dev: The device that is to be stripped of its children
* @drv: The targeted driver
- * @return 0 on success, -ve on error
+ * Return: 0 on success, -ve on error
*/
#if CONFIG_IS_ENABLED(DM_DEVICE_REMOVE)
int device_chld_unbind(struct udevice *dev, struct driver *drv);
@@ -261,7 +261,7 @@
* @dev: The device whose children are to be removed
* @drv: The targeted driver
* @flags: Flag, if this functions is called in the pre-OS stage
- * @return 0 on success, -EPROBE_DEFER if any child failed to remove, other
+ * Return: 0 on success, -EPROBE_DEFER if any child failed to remove, other
* -ve on error
*/
#if CONFIG_IS_ENABLED(DM_DEVICE_REMOVE)
@@ -385,7 +385,7 @@
*
* @dev: Simple bus device (parent of target device)
* @addr: Address to translate
- * @return new address
+ * Return: new address
*/
fdt_addr_t simple_bus_translate(struct udevice *dev, fdt_addr_t addr);
diff --git a/include/dm/pci.h b/include/dm/pci.h
index bddacbf..d35d24d 100644
--- a/include/dm/pci.h
+++ b/include/dm/pci.h
@@ -16,7 +16,7 @@
* This returns an int to avoid a dependency on pci.h
*
* @dev: PCI device
- * @return devfn in bits 15...8 if found (pci_dev_t format), or -ENODEV if not
+ * Return: devfn in bits 15...8 if found (pci_dev_t format), or -ENODEV if not
* found
*/
int pci_get_devfn(struct udevice *dev);
@@ -33,7 +33,7 @@
* @reg: reg value from dt-plat.c array (first member). This is not a
* pointer type, since the caller may use fdt32_t or fdt64_t depending on
* the address sizes.
- * @return device/function for that device (pci_dev_t format)
+ * Return: device/function for that device (pci_dev_t format)
*/
static inline int pci_ofplat_get_devfn(u32 reg)
{
diff --git a/include/dm/test.h b/include/dm/test.h
index a9562b2..4919064 100644
--- a/include/dm/test.h
+++ b/include/dm/test.h
@@ -26,7 +26,7 @@
* @dev: Device to operate on
* @pingval: Value to ping the device with
* @pingret: Returns resulting value from driver
- * @return 0 if OK, -ve on error
+ * Return: 0 if OK, -ve on error
*/
struct test_ops {
int (*ping)(struct udevice *dev, int pingval, int *pingret);
@@ -189,7 +189,7 @@
* @dev: Device to test
* @base: Base address, used to check ping return value
* @priv: Pointer to private test information
- * @return 0 if OK, -ve on error
+ * Return: 0 if OK, -ve on error
*/
int dm_check_operations(struct unit_test_state *uts, struct udevice *dev,
uint32_t base, struct dm_test_priv *priv);
@@ -199,7 +199,7 @@
*
* @dms: Overall test state
* @num_devices: Number of test devices to check
- * @return 0 if OK, -ve on error
+ * Return: 0 if OK, -ve on error
*/
int dm_check_devices(struct unit_test_state *uts, int num_devices);
diff --git a/include/dm/uclass-internal.h b/include/dm/uclass-internal.h
index fb0edcc..e71b86a 100644
--- a/include/dm/uclass-internal.h
+++ b/include/dm/uclass-internal.h
@@ -89,7 +89,7 @@
* This allows assigning the sequence number in the binding order.
*
* @uc: uclass to check
- * @return The next free sequence number
+ * Return: The next free sequence number
*/
int uclass_find_next_free_seq(struct uclass *uc);
@@ -101,7 +101,7 @@
* @dev: Device that needs to be probed
* @ret: Error to return. If non-zero then the device is not probed
* @devp: Returns the value of 'dev' if there is no error
- * @return ret, if non-zero, else the result of the device_probe() call
+ * Return: ret, if non-zero, else the result of the device_probe() call
*/
int uclass_get_device_tail(struct udevice *dev, int ret, struct udevice **devp);
@@ -112,7 +112,7 @@
*
* The device is not prepared for use - this is an internal function.
*
- * @return the index of the device in the uclass list or -ENODEV if not found.
+ * Return: the index of the device in the uclass list or -ENODEV if not found.
*/
int dev_get_uclass_index(struct udevice *dev, struct uclass **ucp);
@@ -125,7 +125,7 @@
* 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.
*
- * @return the uclass pointer of a child at the given index or
+ * Return: the uclass pointer of a child at the given index or
* return NULL on error.
*/
int uclass_find_device(enum uclass_id id, int index, struct udevice **devp);
@@ -138,7 +138,7 @@
* 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.
*
- * @return 0 if OK (found or not found), -ve on error
+ * Return: 0 if OK (found or not found), -ve on error
*/
int uclass_find_first_device(enum uclass_id id, struct udevice **devp);
@@ -150,7 +150,7 @@
* 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.
*
- * @return 0 if OK (found or not found), -ve on error
+ * Return: 0 if OK (found or not found), -ve on error
*/
int uclass_find_next_device(struct udevice **devp);
@@ -164,7 +164,7 @@
* @id: ID to look up
* @name: name of a device to find
* @devp: Returns pointer to device (the first one with the name)
- * @return 0 if OK, -ve on error
+ * Return: 0 if OK, -ve on error
*/
int uclass_find_device_by_name(enum uclass_id id, const char *name,
struct udevice **devp);
@@ -179,7 +179,7 @@
* @id: ID to look up
* @seq: Sequence number to find (0=first)
* @devp: Returns pointer to device (there is only one per for each seq)
- * @return 0 if OK, -ENODEV if not found
+ * Return: 0 if OK, -ENODEV if not found
*/
int uclass_find_device_by_seq(enum uclass_id id, int seq,
struct udevice **devp);
@@ -195,7 +195,7 @@
* @id: ID to look up
* @node: Device tree offset to search for (if -ve then -ENODEV is returned)
* @devp: Returns pointer to device (there is only one for each node)
- * @return 0 if OK, -ve on error
+ * Return: 0 if OK, -ve on error
*/
int uclass_find_device_by_of_offset(enum uclass_id id, int node,
struct udevice **devp);
@@ -211,7 +211,7 @@
* @id: ID to look up
* @node: Device tree offset to search for (if NULL then -ENODEV is returned)
* @devp: Returns pointer to device (there is only one for each node)
- * @return 0 if OK, -ve on error
+ * Return: 0 if OK, -ve on error
*/
int uclass_find_device_by_ofnode(enum uclass_id id, ofnode node,
struct udevice **devp);
@@ -227,7 +227,7 @@
* @parent: Parent device containing the phandle pointer
* @name: Name of property in the parent device node
* @devp: Returns pointer to device (there is only one for each node)
- * @return 0 if OK, -ENOENT if there is no @name present in the node, other
+ * Return: 0 if OK, -ENOENT if there is no @name present in the node, other
* -ve on error
*/
int uclass_find_device_by_phandle(enum uclass_id id, struct udevice *parent,
@@ -317,7 +317,7 @@
* uclass_find() - Find uclass by its id
*
* @id: Id to serach for
- * @return pointer to uclass, or NULL if not found
+ * Return: pointer to uclass, or NULL if not found
*/
struct uclass *uclass_find(enum uclass_id key);
@@ -327,7 +327,7 @@
* Destroy a uclass and all its devices
*
* @uc: uclass to destroy
- * @return 0 on success, -ve on error
+ * Return: 0 on success, -ve on error
*/
int uclass_destroy(struct uclass *uc);
diff --git a/include/dm/util.h b/include/dm/util.h
index 17baf55..4428f04 100644
--- a/include/dm/util.h
+++ b/include/dm/util.h
@@ -20,7 +20,7 @@
* list_count_items() - Count number of items in a list
*
* @param head: Head of list
- * @return number of items, or 0 if empty
+ * Return: number of items, or 0 if empty
*/
int list_count_items(struct list_head *head);