From 185f812c419f1b4f0d10d9787d59cf9f11a2a600 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Wed, 19 Jan 2022 18:05:50 +0100 Subject: 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 --- cmd/acpi.c | 2 +- cmd/cramfs.c | 4 ++-- cmd/cros_ec.c | 4 ++-- cmd/gpt.c | 10 +++++----- cmd/jffs2.c | 16 ++++++++-------- cmd/mtdparts.c | 58 ++++++++++++++++++++++++++++---------------------------- cmd/pci.c | 2 +- cmd/pinmux.c | 2 +- cmd/setexpr.c | 2 +- cmd/sf.c | 8 ++++---- cmd/tpm-common.c | 14 +++++++------- 11 files changed, 61 insertions(+), 61 deletions(-) (limited to 'cmd') diff --git a/cmd/acpi.c b/cmd/acpi.c index e5b9a17..9c3462b 100644 --- a/cmd/acpi.c +++ b/cmd/acpi.c @@ -39,7 +39,7 @@ static void dump_hdr(struct acpi_table_header *hdr) * find_table() - Look up an ACPI table * * @sig: Signature of table (4 characters, upper case) - * @return pointer to table header, or NULL if not found + * Return: pointer to table header, or NULL if not found */ struct acpi_table_header *find_table(const char *sig) { diff --git a/cmd/cramfs.c b/cmd/cramfs.c index d79292b..2aad50c 100644 --- a/cmd/cramfs.c +++ b/cmd/cramfs.c @@ -92,7 +92,7 @@ extern int cramfs_info (struct part_info *info); * @param flag command flag * @param argc number of arguments supplied to the command * @param argv arguments list - * @return 0 on success, 1 otherwise + * Return: 0 on success, 1 otherwise */ int do_cramfs_load(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) @@ -161,7 +161,7 @@ int do_cramfs_load(struct cmd_tbl *cmdtp, int flag, int argc, * @param flag command flag * @param argc number of arguments supplied to the command * @param argv arguments list - * @return 0 on success, 1 otherwise + * Return: 0 on success, 1 otherwise */ int do_cramfs_ls(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { diff --git a/cmd/cros_ec.c b/cmd/cros_ec.c index a40f589..ad49905 100644 --- a/cmd/cros_ec.c +++ b/cmd/cros_ec.c @@ -23,7 +23,7 @@ static const char * const ec_current_image_name[] = {"unknown", "RO", "RW"}; * * @param argc Number of params remaining * @param argv List of remaining parameters - * @return flash region (EC_FLASH_REGION_...) or -1 on error + * Return: flash region (EC_FLASH_REGION_...) or -1 on error */ static int cros_ec_decode_region(int argc, char *const argv[]) { @@ -48,7 +48,7 @@ static int cros_ec_decode_region(int argc, char *const argv[]) * @param is_write 1 do to a write, 0 to do a read * @param argc Number of arguments * @param argv Arguments (2 is region, 3 is address) - * @return 0 for ok, 1 for a usage error or -ve for ec command error + * Return: 0 for ok, 1 for a usage error or -ve for ec command error * (negative EC_RES_...) */ static int do_read_write(struct udevice *dev, int is_write, int argc, diff --git a/cmd/gpt.c b/cmd/gpt.c index f818fbb..1c0525f 100644 --- a/cmd/gpt.c +++ b/cmd/gpt.c @@ -38,7 +38,7 @@ static LIST_HEAD(disk_partitions); * @param str - pointer to string * @param env - pointer to pointer to extracted env * - * @return - zero on successful expand and env is set + * Return: - zero on successful expand and env is set */ static int extract_env(const char *str, char **env) { @@ -97,7 +97,7 @@ static int extract_env(const char *str, char **env) * @param str - pointer to string with key=values pairs * @param key - pointer to the key to search for * - * @return - pointer to allocated string with the value + * Return: - pointer to allocated string with the value */ static char *extract_val(const char *str, const char *key) { @@ -134,7 +134,7 @@ static char *extract_val(const char *str, const char *key) * @param str - pointer to string with key * @param key - pointer to the key to search for * - * @return - true on found key + * Return: - true on found key */ static bool found_key(const char *str, const char *key) { @@ -403,7 +403,7 @@ static int do_get_gpt_info(struct blk_desc *dev_desc, char * const namestr) * @param partitions - pointer to pointer to allocated partitions array * @param parts_count - number of partitions * - * @return - zero on success, otherwise error + * Return: - zero on success, otherwise error * */ static int set_gpt_info(struct blk_desc *dev_desc, @@ -969,7 +969,7 @@ static int do_rename_gpt_parts(struct blk_desc *dev_desc, char *subcomm, * @param argc * @param argv * - * @return zero on success; otherwise error + * Return: zero on success; otherwise error */ static int do_gpt(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { diff --git a/cmd/jffs2.c b/cmd/jffs2.c index 6f15b57..914a7be 100644 --- a/cmd/jffs2.c +++ b/cmd/jffs2.c @@ -149,7 +149,7 @@ extern int cramfs_info (struct part_info *info); * Check device number to be within valid range for given device type. * * @param dev device to validate - * @return 0 if device is valid, 1 otherwise + * Return: 0 if device is valid, 1 otherwise */ static int mtd_device_validate(u8 type, u8 num, u32 *size) { @@ -201,7 +201,7 @@ static int mtd_device_validate(u8 type, u8 num, u32 *size) * @param ret_id output pointer to next char after parse completes (output) * @param dev_type parsed device type (output) * @param dev_num parsed device number (output) - * @return 0 on success, 1 otherwise + * Return: 0 on success, 1 otherwise */ static int mtd_id_parse(const char *id, const char **ret_id, u8 *dev_type, u8 *dev_num) { @@ -241,7 +241,7 @@ static int mtd_id_parse(const char *id, const char **ret_id, u8 *dev_type, u8 *d /** * Calculate sector size. * - * @return sector size + * Return: sector size */ static inline u32 get_part_sector_size_nand(struct mtdids *id) { @@ -329,7 +329,7 @@ static inline u32 get_part_sector_size(struct mtdids *id, struct part_info *part * 'Static' version of command line mtdparts_init() routine. Single partition on * a single device configuration. * - * @return 0 on success, 1 otherwise + * Return: 0 on success, 1 otherwise */ int mtdparts_init(void) { @@ -412,7 +412,7 @@ int mtdparts_init(void) * * @param dev device that is to be searched for a partition * @param part_num requested partition number - * @return pointer to the part_info, NULL otherwise + * Return: pointer to the part_info, NULL otherwise */ static struct part_info* jffs2_part_info(struct mtd_device *dev, unsigned int part_num) { @@ -459,7 +459,7 @@ static struct part_info* jffs2_part_info(struct mtd_device *dev, unsigned int pa * @param flag command flag * @param argc number of arguments supplied to the command * @param argv arguments list - * @return 0 on success, 1 otherwise + * Return: 0 on success, 1 otherwise */ int do_jffs2_fsload(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) @@ -522,7 +522,7 @@ int do_jffs2_fsload(struct cmd_tbl *cmdtp, int flag, int argc, * @param flag command flag * @param argc number of arguments supplied to the command * @param argv arguments list - * @return 0 on success, 1 otherwise + * Return: 0 on success, 1 otherwise */ int do_jffs2_ls(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { @@ -560,7 +560,7 @@ int do_jffs2_ls(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) * @param flag command flag * @param argc number of arguments supplied to the command * @param argv arguments list - * @return 0 on success, 1 otherwise + * Return: 0 on success, 1 otherwise */ int do_jffs2_fsinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) diff --git a/cmd/mtdparts.c b/cmd/mtdparts.c index 3048700..bab75a2 100644 --- a/cmd/mtdparts.c +++ b/cmd/mtdparts.c @@ -170,7 +170,7 @@ static int device_del(struct mtd_device *dev); * * @param ptr where parse begins * @param retptr output pointer to next char after parse completes (output) - * @return resulting unsigned int + * Return: resulting unsigned int */ static u64 memsize_parse (const char *const ptr, const char **retptr) { @@ -302,7 +302,7 @@ static void current_save(void) * @param type mtd type * @param num mtd number * @param mtd a pointer to an mtd_info instance (output) - * @return 0 if device is valid, 1 otherwise + * Return: 0 if device is valid, 1 otherwise */ static int get_mtd_info(u8 type, u8 num, struct mtd_info **mtd) { @@ -326,7 +326,7 @@ static int get_mtd_info(u8 type, u8 num, struct mtd_info **mtd) * * @param id of the parent device * @param part partition to validate - * @return 0 if partition is valid, 1 otherwise + * Return: 0 if partition is valid, 1 otherwise */ static int part_validate_eraseblock(struct mtdids *id, struct part_info *part) { @@ -413,7 +413,7 @@ static int part_validate_eraseblock(struct mtdids *id, struct part_info *part) * * @param id of the parent device * @param part partition to validate - * @return 0 if partition is valid, 1 otherwise + * Return: 0 if partition is valid, 1 otherwise */ static int part_validate(struct mtdids *id, struct part_info *part) { @@ -449,7 +449,7 @@ static int part_validate(struct mtdids *id, struct part_info *part) * * @param dev device to delete partition from * @param part partition to delete - * @return 0 on success, 1 otherwise + * Return: 0 on success, 1 otherwise */ static int part_del(struct mtd_device *dev, struct part_info *part) { @@ -577,7 +577,7 @@ static int part_sort_add(struct mtd_device *dev, struct part_info *part) * * @param dev device to which partition is added * @param part partition to be added - * @return 0 on success, 1 otherwise + * Return: 0 on success, 1 otherwise */ static int part_add(struct mtd_device *dev, struct part_info *part) { @@ -599,7 +599,7 @@ static int part_add(struct mtd_device *dev, struct part_info *part) * @param partdef pointer to the partition definition string i.e. * @param ret output pointer to next char after parse completes (output) * @param retpart pointer to the allocated partition (output) - * @return 0 on success, 1 otherwise + * Return: 0 on success, 1 otherwise */ static int part_parse(const char *const partdef, const char **ret, struct part_info **retpart) { @@ -717,7 +717,7 @@ static int part_parse(const char *const partdef, const char **ret, struct part_i * @param type mtd type * @param num mtd number * @param size a pointer to the size of the mtd device (output) - * @return 0 if device is valid, 1 otherwise + * Return: 0 if device is valid, 1 otherwise */ static int mtd_device_validate(u8 type, u8 num, u64 *size) { @@ -735,7 +735,7 @@ static int mtd_device_validate(u8 type, u8 num, u64 *size) * Delete all mtd devices from a supplied devices list, free memory allocated for * each device and delete all device partitions. * - * @return 0 on success, 1 otherwise + * Return: 0 on success, 1 otherwise */ static int device_delall(struct list_head *head) { @@ -759,7 +759,7 @@ static int device_delall(struct list_head *head) * from device list and device memory is freed. * * @param dev device to be deleted - * @return 0 on success, 1 otherwise + * Return: 0 on success, 1 otherwise */ static int device_del(struct mtd_device *dev) { @@ -791,7 +791,7 @@ static int device_del(struct mtd_device *dev) * * @param type device type * @param num device number - * @return NULL if requested device does not exist + * Return: NULL if requested device does not exist */ struct mtd_device *device_find(u8 type, u8 num) { @@ -838,7 +838,7 @@ static void device_add(struct mtd_device *dev) * @param mtd_dev pointer to the device definition string i.e. * @param ret output pointer to next char after parse completes (output) * @param retdev pointer to the allocated device (output) - * @return 0 on success, 1 otherwise + * Return: 0 on success, 1 otherwise */ static int device_parse(const char *const mtd_dev, const char **ret, struct mtd_device **retdev) { @@ -969,7 +969,7 @@ static int device_parse(const char *const mtd_dev, const char **ret, struct mtd_ /** * Initialize global device list. * - * @return 0 on success, 1 otherwise + * Return: 0 on success, 1 otherwise */ static int mtd_devices_init(void) { @@ -983,7 +983,7 @@ static int mtd_devices_init(void) /* * Search global mtdids list and find id of requested type and number. * - * @return pointer to the id if it exists, NULL otherwise + * Return: pointer to the id if it exists, NULL otherwise */ static struct mtdids* id_find(u8 type, u8 num) { @@ -1007,7 +1007,7 @@ static struct mtdids* id_find(u8 type, u8 num) * * @param mtd_id string containing requested mtd_id * @param mtd_id_len length of supplied mtd_id - * @return pointer to the id if it exists, NULL otherwise + * Return: pointer to the id if it exists, NULL otherwise */ static struct mtdids* id_find_by_mtd_id(const char *mtd_id, unsigned int mtd_id_len) { @@ -1040,7 +1040,7 @@ static struct mtdids* id_find_by_mtd_id(const char *mtd_id, unsigned int mtd_id_ * @param ret_id output pointer to next char after parse completes (output) * @param dev_type parsed device type (output) * @param dev_num parsed device number (output) - * @return 0 on success, 1 otherwise + * Return: 0 on success, 1 otherwise */ int mtd_id_parse(const char *id, const char **ret_id, u8 *dev_type, u8 *dev_num) @@ -1082,7 +1082,7 @@ int mtd_id_parse(const char *id, const char **ret_id, u8 *dev_type, * * @param buf output buffer holding generated mtdparts string (output) * @param buflen buffer size - * @return 0 on success, 1 otherwise + * Return: 0 on success, 1 otherwise */ static int generate_mtdparts(char *buf, u32 buflen) { @@ -1207,7 +1207,7 @@ cleanup: * * @param buf output buffer holding generated mtdparts string (output) * @param buflen buffer size - * @return 0 on success, 1 otherwise + * Return: 0 on success, 1 otherwise */ static int generate_mtdparts_save(char *buf, u32 buflen) { @@ -1229,7 +1229,7 @@ static int generate_mtdparts_save(char *buf, u32 buflen) * * @param mtd the mtd info * @param part the partition - * @return the calculated net size of this partition + * Return: the calculated net size of this partition */ static uint64_t net_part_size(struct mtd_info *mtd, struct part_info *part) { @@ -1345,7 +1345,7 @@ static void list_partitions(void) * @param dev pointer to the requested device (output) * @param part_num verified partition number (output) * @param part pointer to requested partition (output) - * @return 0 on success, 1 otherwise + * Return: 0 on success, 1 otherwise */ int find_dev_and_part(const char *id, struct mtd_device **dev, u8 *part_num, struct part_info **part) @@ -1405,7 +1405,7 @@ int find_dev_and_part(const char *id, struct mtd_device **dev, * Find and delete partition. For partition id format see find_dev_and_part(). * * @param id string describing device and partition - * @return 0 on success, 1 otherwise + * Return: 0 on success, 1 otherwise */ static int delete_partition(const char *id) { @@ -1481,7 +1481,7 @@ static void spread_partition(struct mtd_info *mtd, struct part_info *part, * as big as their mtdparts environment variable sizes and they each start * on a good block. * - * @return 0 on success, 1 otherwise + * Return: 0 on success, 1 otherwise */ static int spread_partitions(void) { @@ -1534,7 +1534,7 @@ static int spread_partitions(void) * buffer. gd->env_buf will be too small. * * @param buf temporary buffer pointer MTDPARTS_MAXLEN long - * @return mtdparts variable string, NULL if not found + * Return: mtdparts variable string, NULL if not found */ static const char *env_get_mtdparts(char *buf) { @@ -1550,7 +1550,7 @@ static const char *env_get_mtdparts(char *buf) * for each entry. Add created devices to the global devices list. * * @param mtdparts string specifing mtd partitions - * @return 0 on success, 1 otherwise + * Return: 0 on success, 1 otherwise */ static int parse_mtdparts(const char *const mtdparts) { @@ -1608,7 +1608,7 @@ static int parse_mtdparts(const char *const mtdparts) * to the global mtdids list. * * @param ids mapping string - * @return 0 on success, 1 otherwise + * Return: 0 on success, 1 otherwise */ static int parse_mtdids(const char *const ids) { @@ -1718,7 +1718,7 @@ static int parse_mtdids(const char *const ids) * Parse and initialize global mtdids mapping and create global * device/partition list. * - * @return 0 on success, 1 otherwise + * Return: 0 on success, 1 otherwise */ int mtdparts_init(void) { @@ -1868,7 +1868,7 @@ int mtdparts_init(void) * * @param dev device that is to be searched for a partition * @param part_num requested partition number - * @return pointer to the part_info, NULL otherwise + * Return: pointer to the part_info, NULL otherwise */ static struct part_info* mtd_part_info(struct mtd_device *dev, unsigned int part_num) { @@ -1915,7 +1915,7 @@ static struct part_info* mtd_part_info(struct mtd_device *dev, unsigned int part * @param flag command flag * @param argc number of arguments supplied to the command * @param argv arguments list - * @return 0 on success, 1 otherwise + * Return: 0 on success, 1 otherwise */ static int do_chpart(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) @@ -1954,7 +1954,7 @@ static int do_chpart(struct cmd_tbl *cmdtp, int flag, int argc, * @param flag command flag * @param argc number of arguments supplied to the command * @param argv arguments list - * @return 0 on success, 1 otherwise + * Return: 0 on success, 1 otherwise */ static int do_mtdparts(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) diff --git a/cmd/pci.c b/cmd/pci.c index 3b1863f..389b41c 100644 --- a/cmd/pci.c +++ b/cmd/pci.c @@ -317,7 +317,7 @@ static void pciinfo(struct udevice *bus, bool short_listing) * get_pci_dev() - Convert the "bus.device.function" identifier into a number * * @name: Device string in the form "bus.device.function" where each is in hex - * @return encoded pci_dev_t or -1 if the string was invalid + * Return: encoded pci_dev_t or -1 if the string was invalid */ static pci_dev_t get_pci_dev(char *name) { diff --git a/cmd/pinmux.c b/cmd/pinmux.c index 2d23357..f17cf41 100644 --- a/cmd/pinmux.c +++ b/cmd/pinmux.c @@ -47,7 +47,7 @@ static int do_dev(struct cmd_tbl *cmdtp, int flag, int argc, * @param dev pinctrl device * @param name NULL to display all the pins * or name of the pin to display - * @return 0 on success, non-0 on error + * Return: 0 on success, non-0 on error */ static int show_pinmux(struct udevice *dev, char *name) { diff --git a/cmd/setexpr.c b/cmd/setexpr.c index 05d6558..4d671e7 100644 --- a/cmd/setexpr.c +++ b/cmd/setexpr.c @@ -140,7 +140,7 @@ static char *memstr(const char *s1, int l1, const char *s2, int l2) * @olen: Length of @old excluding terminator * @new: New string to replace @old with * @nlen: Length of @new excluding terminator - * @return pointer to immediately after the copied @new in @string, or NULL if + * Return: pointer to immediately after the copied @new in @string, or NULL if * no replacement took place */ static char *substitute(char *string, int *slen, int ssize, diff --git a/cmd/sf.c b/cmd/sf.c index 72246d9..8bdebd9 100644 --- a/cmd/sf.c +++ b/cmd/sf.c @@ -72,7 +72,7 @@ static int sf_parse_len_arg(char *arg, ulong *len) * * @param len amount of bytes currently processed * @param start_ms start time of processing in ms - * @return bytes per second if OK, 0 on error + * Return: bytes per second if OK, 0 on error */ static ulong bytes_per_second(unsigned int len, ulong start_ms) { @@ -166,7 +166,7 @@ static int do_spi_flash_probe(int argc, char *const argv[]) * @param buf buffer to write from * @param cmp_buf read buffer to use to compare data * @param skipped Count of skipped data (incremented by this function) - * @return NULL if OK, else a string containing the stage which failed + * Return: NULL if OK, else a string containing the stage which failed */ static const char *spi_flash_update_block(struct spi_flash *flash, u32 offset, size_t len, const char *buf, char *cmp_buf, size_t *skipped) @@ -208,7 +208,7 @@ static const char *spi_flash_update_block(struct spi_flash *flash, u32 offset, * @param offset flash offset to write * @param len number of bytes to write * @param buf buffer to write from - * @return 0 if ok, 1 on error + * Return: 0 if ok, 1 on error */ static int spi_flash_update(struct spi_flash *flash, u32 offset, size_t len, const char *buf) @@ -438,7 +438,7 @@ static void spi_test_next_stage(struct test_info *test) * @param len Size of data to read/write * @param offset Offset within flash to check * @param vbuf Verification buffer - * @return 0 if ok, -1 on error + * Return: 0 if ok, -1 on error */ static int spi_flash_test(struct spi_flash *flash, uint8_t *buf, ulong len, ulong offset, uint8_t *vbuf) diff --git a/cmd/tpm-common.c b/cmd/tpm-common.c index 1d5442c..47adaff 100644 --- a/cmd/tpm-common.c +++ b/cmd/tpm-common.c @@ -46,7 +46,7 @@ void print_byte_string(u8 *data, size_t count) * NULL is passed, a large enough buffer will be allocated, * and the caller must free it. * @param count_ptr output variable for the length of byte string - * @return pointer to output buffer + * Return: pointer to output buffer */ void *parse_byte_string(char *bytes, u8 *data, size_t *count_ptr) { @@ -81,7 +81,7 @@ void *parse_byte_string(char *bytes, u8 *data, size_t *count_ptr) * report_return_code() - Report any error and return failure or success * * @param return_code TPM command return code - * @return value of enum command_ret_t + * Return: value of enum command_ret_t */ int report_return_code(int return_code) { @@ -97,7 +97,7 @@ int report_return_code(int return_code) * Return number of values defined by a type string. * * @param type_str type string - * @return number of values of type string + * Return: number of values of type string */ int type_string_get_num_values(const char *type_str) { @@ -108,7 +108,7 @@ int type_string_get_num_values(const char *type_str) * Return total size of values defined by a type string. * * @param type_str type string - * @return total size of values of type string, or 0 if type string + * Return: total size of values of type string, or 0 if type string * contains illegal type character. */ size_t type_string_get_space_size(const char *type_str) @@ -140,7 +140,7 @@ size_t type_string_get_space_size(const char *type_str) * * @param type_str type string * @param count pointer for storing size of buffer - * @return pointer to buffer or NULL on error + * Return: pointer to buffer or NULL on error */ void *type_string_alloc(const char *type_str, u32 *count) { @@ -164,7 +164,7 @@ void *type_string_alloc(const char *type_str, u32 *count) * @param type_str type string * @param values text strings of values to be packed * @param data output buffer of values - * @return 0 on success, non-0 on error + * Return: 0 on success, non-0 on error */ int type_string_pack(const char *type_str, char * const values[], u8 *data) @@ -202,7 +202,7 @@ int type_string_pack(const char *type_str, char * const values[], * @param type_str type string * @param data input buffer of values * @param vars names of environment variables - * @return 0 on success, non-0 on error + * Return: 0 on success, non-0 on error */ int type_string_write_vars(const char *type_str, u8 *data, char * const vars[]) -- cgit v1.1