Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

of: Add missing 'Return' section in kerneldoc comments

Many of the DT kerneldoc comments are lacking a 'Return' section. Let's
add the section in cases we have a description of return values. There's
still some cases where the return values are not documented.

Cc: Frank Rowand <frowand.list@gmail.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/20210325164713.1296407-8-robh@kernel.org

+140 -95
+21 -18
drivers/of/base.c
··· 244 244 * @prev: Previous node or NULL to start iteration 245 245 * of_node_put() will be called on it 246 246 * 247 - * Returns a node pointer with refcount incremented, use 247 + * Return: A node pointer with refcount incremented, use 248 248 * of_node_put() on it when done. 249 249 */ 250 250 struct device_node *of_find_all_nodes(struct device_node *prev) ··· 374 374 * before booting secondary cores. This function uses arch_match_cpu_phys_id 375 375 * which can be overridden by architecture specific implementation. 376 376 * 377 - * Returns a node pointer for the logical cpu with refcount incremented, use 377 + * Return: A node pointer for the logical cpu with refcount incremented, use 378 378 * of_node_put() on it when done. Returns NULL if not found. 379 379 */ 380 380 struct device_node *of_get_cpu_node(int cpu, unsigned int *thread) ··· 394 394 * 395 395 * @cpu_node: Pointer to the device_node for CPU. 396 396 * 397 - * Returns the logical CPU number of the given CPU device_node. 398 - * Returns -ENODEV if the CPU is not found. 397 + * Return: The logical CPU number of the given CPU device_node or -ENODEV if the 398 + * CPU is not found. 399 399 */ 400 400 int of_cpu_node_to_id(struct device_node *cpu_node) 401 401 { ··· 427 427 * bindings. This function check for both and returns the idle state node for 428 428 * the requested index. 429 429 * 430 - * In case an idle state node is found at @index, the refcount is incremented 430 + * Return: An idle state node if found at @index. The refcount is incremented 431 431 * for it, so call of_node_put() on it when done. Returns NULL if not found. 432 432 */ 433 433 struct device_node *of_get_cpu_state_node(struct device_node *cpu_node, ··· 561 561 * of_machine_is_compatible - Test root of device tree for a given compatible value 562 562 * @compat: compatible string to look for in root node's compatible property. 563 563 * 564 - * Returns a positive integer if the root node has the given value in its 564 + * Return: A positive integer if the root node has the given value in its 565 565 * compatible property. 566 566 */ 567 567 int of_machine_is_compatible(const char *compat) ··· 583 583 * 584 584 * @device: Node to check for availability, with locks already held 585 585 * 586 - * Returns true if the status property is absent or set to "okay" or "ok", 586 + * Return: True if the status property is absent or set to "okay" or "ok", 587 587 * false otherwise 588 588 */ 589 589 static bool __of_device_is_available(const struct device_node *device) ··· 611 611 * 612 612 * @device: Node to check for availability 613 613 * 614 - * Returns true if the status property is absent or set to "okay" or "ok", 614 + * Return: True if the status property is absent or set to "okay" or "ok", 615 615 * false otherwise 616 616 */ 617 617 bool of_device_is_available(const struct device_node *device) ··· 632 632 * 633 633 * @device: Node to check for endianness 634 634 * 635 - * Returns true if the device has a "big-endian" property, or if the kernel 635 + * Return: True if the device has a "big-endian" property, or if the kernel 636 636 * was compiled for BE *and* the device has a "native-endian" property. 637 637 * Returns false otherwise. 638 638 * ··· 816 816 * Lookup child node whose compatible property contains the given compatible 817 817 * string. 818 818 * 819 - * Returns a node pointer with refcount incremented, use of_node_put() on it 819 + * Return: a node pointer with refcount incremented, use of_node_put() on it 820 820 * when done; or NULL if not found. 821 821 */ 822 822 struct device_node *of_get_compatible_child(const struct device_node *parent, ··· 1170 1170 * It does this by stripping the manufacturer prefix (as delimited by a ',') 1171 1171 * from the first entry in the compatible list property. 1172 1172 * 1173 - * This routine returns 0 on success, <0 on failure. 1173 + * Return: This routine returns 0 on success, <0 on failure. 1174 1174 */ 1175 1175 int of_modalias_node(struct device_node *node, char *modalias, int len) 1176 1176 { ··· 1190 1190 * of_find_node_by_phandle - Find a node given a phandle 1191 1191 * @handle: phandle of the node to find 1192 1192 * 1193 - * Returns a node pointer with refcount incremented, use 1193 + * Return: A node pointer with refcount incremented, use 1194 1194 * of_node_put() on it when done. 1195 1195 */ 1196 1196 struct device_node *of_find_node_by_phandle(phandle handle) ··· 1426 1426 * @index: For properties holding a table of phandles, this is the index into 1427 1427 * the table 1428 1428 * 1429 - * Returns the device_node pointer with refcount incremented. Use 1429 + * Return: The device_node pointer with refcount incremented. Use 1430 1430 * of_node_put() on it when done. 1431 1431 */ 1432 1432 struct device_node *of_parse_phandle(const struct device_node *np, ··· 1726 1726 * @list_name: property name that contains a list 1727 1727 * @cells_name: property name that specifies phandles' arguments count 1728 1728 * 1729 - * Returns the number of phandle + argument tuples within a property. It 1729 + * Return: The number of phandle + argument tuples within a property. It 1730 1730 * is a typical pattern to encode a list of phandle and variable 1731 1731 * arguments into a single property. The number of arguments is encoded 1732 1732 * by a property in the phandle-target node. For example, a gpios ··· 2026 2026 * @stem: Alias stem of the given device_node 2027 2027 * 2028 2028 * The function travels the lookup table to get the alias id for the given 2029 - * device_node and alias stem. It returns the alias id if found. 2029 + * device_node and alias stem. 2030 + * 2031 + * Return: The alias id if found. 2030 2032 */ 2031 2033 int of_alias_get_id(struct device_node *np, const char *stem) 2032 2034 { ··· 2137 2135 * @index: Index to use for preferred console. 2138 2136 * 2139 2137 * Check if the given device node matches the stdout-path property in the 2140 - * /chosen node. If it does then register it as the preferred console and return 2141 - * TRUE. Otherwise return FALSE. 2138 + * /chosen node. If it does then register it as the preferred console. 2139 + * 2140 + * Return: TRUE if console successfully setup. Otherwise return FALSE. 2142 2141 */ 2143 2142 bool of_console_check(struct device_node *dn, char *name, int index) 2144 2143 { ··· 2190 2187 * 2191 2188 * @cpu: cpu number(logical index) for which the last cache level is needed 2192 2189 * 2193 - * Returns the the level at which the last cache is present. It is exactly 2190 + * Return: The the level at which the last cache is present. It is exactly 2194 2191 * same as the total number of cache levels for the given logical cpu. 2195 2192 */ 2196 2193 int of_find_last_cache_level(unsigned int cpu)
+12 -7
drivers/of/dynamic.c
··· 27 27 * @node: Node to inc refcount, NULL is supported to simplify writing of 28 28 * callers 29 29 * 30 - * Returns node. 30 + * Return: The node with refcount incremented. 31 31 */ 32 32 struct device_node *of_node_get(struct device_node *node) 33 33 { ··· 104 104 * @arg - argument of the of notifier 105 105 * 106 106 * Returns the new state of a device based on the notifier used. 107 - * Returns 0 on device going from enabled to disabled, 1 on device 107 + * 108 + * Return: 0 on device going from enabled to disabled, 1 on device 108 109 * going from disabled to enabled and -1 on no change. 109 110 */ 110 111 int of_reconfig_get_state_change(unsigned long action, struct of_reconfig_data *pr) ··· 375 374 * property structure and the property name & contents. The property's 376 375 * flags have the OF_DYNAMIC bit set so that we can differentiate between 377 376 * dynamically allocated properties and not. 378 - * Returns the newly allocated property or NULL on out of memory error. 377 + * 378 + * Return: The newly allocated property or NULL on out of memory error. 379 379 */ 380 380 struct property *__of_prop_dup(const struct property *prop, gfp_t allocflags) 381 381 { ··· 419 417 * another node. The node data are dynamically allocated and all the node 420 418 * flags have the OF_DYNAMIC & OF_DETACHED bits set. 421 419 * 422 - * Returns the newly allocated node or NULL on out of memory error. 420 + * Return: The newly allocated node or NULL on out of memory error. 423 421 */ 424 422 struct device_node *__of_node_dup(const struct device_node *np, 425 423 const char *full_name) ··· 785 783 * Any side-effects of live tree state changes are applied here on 786 784 * success, like creation/destruction of devices and side-effects 787 785 * like creation of sysfs properties and directories. 788 - * Returns 0 on success, a negative error value in case of an error. 786 + * 787 + * Return: 0 on success, a negative error value in case of an error. 789 788 * On error the partially applied effects are reverted. 790 789 */ 791 790 int of_changeset_apply(struct of_changeset *ocs) ··· 880 877 * was before the application. 881 878 * Any side-effects like creation/destruction of devices and 882 879 * removal of sysfs properties and directories are applied. 883 - * Returns 0 on success, a negative error value in case of an error. 880 + * 881 + * Return: 0 on success, a negative error value in case of an error. 884 882 */ 885 883 int of_changeset_revert(struct of_changeset *ocs) 886 884 { ··· 909 905 * + OF_RECONFIG_ADD_PROPERTY 910 906 * + OF_RECONFIG_REMOVE_PROPERTY, 911 907 * + OF_RECONFIG_UPDATE_PROPERTY 912 - * Returns 0 on success, a negative error value in case of an error. 908 + * 909 + * Return: 0 on success, a negative error value in case of an error. 913 910 */ 914 911 int of_changeset_action(struct of_changeset *ocs, unsigned long action, 915 912 struct device_node *np, struct property *prop)
+4 -4
drivers/of/fdt.c
··· 282 282 * @dad: Parent struct device_node 283 283 * @nodepp: The device_node tree created by the call 284 284 * 285 - * It returns the size of unflattened device tree or error code 285 + * Return: The size of unflattened device tree or error code 286 286 */ 287 287 static int unflatten_dt_nodes(const void *blob, 288 288 void *mem, ··· 360 360 * fills the "name" and "type" pointers of the nodes so the normal device-tree 361 361 * walking functions can be used. 362 362 * 363 - * Returns NULL on failure or the memory chunk containing the unflattened 363 + * Return: NULL on failure or the memory chunk containing the unflattened 364 364 * device tree on success. 365 365 */ 366 366 void *__unflatten_device_tree(const void *blob, ··· 441 441 * pointers of the nodes so the normal device-tree walking functions 442 442 * can be used. 443 443 * 444 - * Returns NULL on failure or the memory chunk containing the unflattened 444 + * Return: NULL on failure or the memory chunk containing the unflattened 445 445 * device tree on success. 446 446 */ 447 447 void *of_fdt_unflatten_tree(const unsigned long *blob, ··· 716 716 * @node: node to test 717 717 * @compat: compatible string to compare with compatible list. 718 718 * 719 - * On match, returns a non-zero value with smaller values returned for more 719 + * Return: a non-zero value on match with smaller values returned for more 720 720 * specific compatible values. 721 721 */ 722 722 static int of_fdt_is_compatible(const void *blob,
+7 -7
drivers/of/irq.c
··· 48 48 * of_irq_find_parent - Given a device node, find its interrupt parent node 49 49 * @child: pointer to device node 50 50 * 51 - * Returns a pointer to the interrupt parent node, or NULL if the interrupt 51 + * Return: A pointer to the interrupt parent node, or NULL if the interrupt 52 52 * parent could not be determined. 53 53 */ 54 54 struct device_node *of_irq_find_parent(struct device_node *child) ··· 81 81 * @addr: address specifier (start of "reg" property of the device) in be32 format 82 82 * @out_irq: structure of_phandle_args updated by this function 83 83 * 84 - * Returns 0 on success and a negative number on error 85 - * 86 84 * This function is a low-level interrupt tree walking function. It 87 85 * can be used to do a partial walk with synthetized reg and interrupts 88 86 * properties, for example when resolving PCI interrupts when no device 89 87 * node exist for the parent. It takes an interrupt specifier structure as 90 88 * input, walks the tree looking for any interrupt-map properties, translates 91 89 * the specifier for each map, and then returns the translated map. 90 + * 91 + * Return: 0 on success and a negative number on error 92 92 */ 93 93 int of_irq_parse_raw(const __be32 *addr, struct of_phandle_args *out_irq) 94 94 { ··· 380 380 * @dev: pointer to device tree node 381 381 * @index: zero-based index of the IRQ 382 382 * 383 - * Returns Linux IRQ number on success, or 0 on the IRQ mapping failure, or 383 + * Return: Linux IRQ number on success, or 0 on the IRQ mapping failure, or 384 384 * -EPROBE_DEFER if the IRQ domain is not yet created, or error code in case 385 385 * of any other failure. 386 386 */ ··· 407 407 * @dev: pointer to device tree node 408 408 * @name: IRQ name 409 409 * 410 - * Returns Linux IRQ number on success, or 0 on the IRQ mapping failure, or 410 + * Return: Linux IRQ number on success, or 0 on the IRQ mapping failure, or 411 411 * -EPROBE_DEFER if the IRQ domain is not yet created, or error code in case 412 412 * of any other failure. 413 413 */ ··· 447 447 * @res: array of resources to fill in 448 448 * @nr_irqs: the number of IRQs (and upper bound for num of @res elements) 449 449 * 450 - * Returns the size of the filled in table (up to @nr_irqs). 450 + * Return: The size of the filled in table (up to @nr_irqs). 451 451 */ 452 452 int of_irq_to_resource_table(struct device_node *dev, struct resource *res, 453 453 int nr_irqs) ··· 602 602 * Walk up the device hierarchy looking for devices with a "msi-map" 603 603 * property. If found, apply the mapping to @id_in. 604 604 * 605 - * Returns the mapped MSI ID. 605 + * Return: The mapped MSI ID. 606 606 */ 607 607 u32 of_msi_map_id(struct device *dev, struct device_node *msi_np, u32 id_in) 608 608 {
+8 -8
drivers/of/overlay.c
··· 298 298 * 299 299 * Update of property in symbols node is not allowed. 300 300 * 301 - * Returns 0 on success, -ENOMEM if memory allocation failure, or -EINVAL if 301 + * Return: 0 on success, -ENOMEM if memory allocation failure, or -EINVAL if 302 302 * invalid @overlay. 303 303 */ 304 304 static int add_changeset_property(struct overlay_changeset *ovcs, ··· 403 403 * 404 404 * NOTE_2: Multiple mods of created nodes not supported. 405 405 * 406 - * Returns 0 on success, -ENOMEM if memory allocation failure, or -EINVAL if 406 + * Return: 0 on success, -ENOMEM if memory allocation failure, or -EINVAL if 407 407 * invalid @overlay. 408 408 */ 409 409 static int add_changeset_node(struct overlay_changeset *ovcs, ··· 475 475 * 476 476 * Do not allow symbols node to have any children. 477 477 * 478 - * Returns 0 on success, -ENOMEM if memory allocation failure, or -EINVAL if 478 + * Return: 0 on success, -ENOMEM if memory allocation failure, or -EINVAL if 479 479 * invalid @overlay_node. 480 480 */ 481 481 static int build_changeset_next_level(struct overlay_changeset *ovcs, ··· 606 606 * the same node or duplicate {add, delete, or update} properties entries 607 607 * for the same property. 608 608 * 609 - * Returns 0 on success, or -EINVAL if duplicate changeset entry found. 609 + * Return: 0 on success, or -EINVAL if duplicate changeset entry found. 610 610 */ 611 611 static int changeset_dup_entry_check(struct overlay_changeset *ovcs) 612 612 { ··· 630 630 * any portions of the changeset that were successfully created will remain 631 631 * in @ovcs->cset. 632 632 * 633 - * Returns 0 on success, -ENOMEM if memory allocation failure, or -EINVAL if 633 + * Return: 0 on success, -ENOMEM if memory allocation failure, or -EINVAL if 634 634 * invalid overlay in @ovcs->fragments[]. 635 635 */ 636 636 static int build_changeset(struct overlay_changeset *ovcs) ··· 726 726 * the top level of @tree. The relevant top level nodes are the fragment 727 727 * nodes and the __symbols__ node. Any other top level node will be ignored. 728 728 * 729 - * Returns 0 on success, -ENOMEM if memory allocation failure, -EINVAL if error 729 + * Return: 0 on success, -ENOMEM if memory allocation failure, -EINVAL if error 730 730 * detected in @tree, or -ENOSPC if idr_alloc() error. 731 731 */ 732 732 static int init_overlay_changeset(struct overlay_changeset *ovcs, ··· 1181 1181 * If an error is returned by an overlay changeset post-remove notifier 1182 1182 * then no further overlay changeset post-remove notifier will be called. 1183 1183 * 1184 - * Returns 0 on success, or a negative error number. *ovcs_id is set to 1184 + * Return: 0 on success, or a negative error number. *ovcs_id is set to 1185 1185 * zero after reverting the changeset, even if a subsequent error occurs. 1186 1186 */ 1187 1187 int of_overlay_remove(int *ovcs_id) ··· 1259 1259 * 1260 1260 * Removes all overlays from the system in the correct order. 1261 1261 * 1262 - * Returns 0 on success, or a negative error number 1262 + * Return: 0 on success, or a negative error number 1263 1263 */ 1264 1264 int of_overlay_remove_all(void) 1265 1265 {
+5 -5
drivers/of/platform.c
··· 44 44 * Takes a reference to the embedded struct device which needs to be dropped 45 45 * after use. 46 46 * 47 - * Returns platform_device pointer, or NULL if not found 47 + * Return: platform_device pointer, or NULL if not found 48 48 */ 49 49 struct platform_device *of_find_device_by_node(struct device_node *np) 50 50 { ··· 160 160 * @platform_data: pointer to populate platform_data pointer with 161 161 * @parent: Linux device model parent device. 162 162 * 163 - * Returns pointer to created platform device, or NULL if a device was not 163 + * Return: Pointer to created platform device, or NULL if a device was not 164 164 * registered. Unavailable devices will not get registered. 165 165 */ 166 166 static struct platform_device *of_platform_device_create_pdata( ··· 204 204 * @bus_id: name to assign device 205 205 * @parent: Linux device model parent device. 206 206 * 207 - * Returns pointer to created platform device, or NULL if a device was not 207 + * Return: Pointer to created platform device, or NULL if a device was not 208 208 * registered. Unavailable devices will not get registered. 209 209 */ 210 210 struct platform_device *of_platform_device_create(struct device_node *np, ··· 463 463 * New board support should be using this function instead of 464 464 * of_platform_bus_probe(). 465 465 * 466 - * Returns 0 on success, < 0 on failure. 466 + * Return: 0 on success, < 0 on failure. 467 467 */ 468 468 int of_platform_populate(struct device_node *root, 469 469 const struct of_device_id *matches, ··· 607 607 * Similar to of_platform_populate(), but will automatically call 608 608 * of_platform_depopulate() when the device is unbound from the bus. 609 609 * 610 - * Returns 0 on success, < 0 on failure. 610 + * Return: 0 on success, < 0 on failure. 611 611 */ 612 612 int devm_of_platform_populate(struct device *dev) 613 613 {
+42 -24
drivers/of/property.c
··· 61 61 * @elem_size: size of the individual element 62 62 * 63 63 * Search for a property in a device node and count the number of elements of 64 - * size elem_size in it. Returns number of elements on sucess, -EINVAL if the 65 - * property does not exist or its length does not match a multiple of elem_size 66 - * and -ENODATA if the property does not have a value. 64 + * size elem_size in it. 65 + * 66 + * Return: The number of elements on sucess, -EINVAL if the property does not 67 + * exist or its length does not match a multiple of elem_size and -ENODATA if 68 + * the property does not have a value. 67 69 */ 68 70 int of_property_count_elems_of_size(const struct device_node *np, 69 71 const char *propname, int elem_size) ··· 97 95 * @len: if !=NULL, actual length is written to here 98 96 * 99 97 * Search for a property in a device node and valid the requested size. 100 - * Returns the property value on success, -EINVAL if the property does not 101 - * exist, -ENODATA if property does not have a value, and -EOVERFLOW if the 98 + * 99 + * Return: The property value on success, -EINVAL if the property does not 100 + * exist, -ENODATA if property does not have a value, and -EOVERFLOW if the 102 101 * property data is too small or too large. 103 102 * 104 103 */ ··· 132 129 * @out_value: pointer to return value, modified only if no error. 133 130 * 134 131 * Search for a property in a device node and read nth 32-bit value from 135 - * it. Returns 0 on success, -EINVAL if the property does not exist, 132 + * it. 133 + * 134 + * Return: 0 on success, -EINVAL if the property does not exist, 136 135 * -ENODATA if property does not have a value, and -EOVERFLOW if the 137 136 * property data isn't large enough. 138 137 * ··· 166 161 * @out_value: pointer to return value, modified only if no error. 167 162 * 168 163 * Search for a property in a device node and read nth 64-bit value from 169 - * it. Returns 0 on success, -EINVAL if the property does not exist, 164 + * it. 165 + * 166 + * Return: 0 on success, -EINVAL if the property does not exist, 170 167 * -ENODATA if property does not have a value, and -EOVERFLOW if the 171 168 * property data isn't large enough. 172 169 * ··· 203 196 * sz_min will be read. 204 197 * 205 198 * Search for a property in a device node and read 8-bit value(s) from 206 - * it. Returns number of elements read on success, -EINVAL if the property 207 - * does not exist, -ENODATA if property does not have a value, and -EOVERFLOW 208 - * if the property data is smaller than sz_min or longer than sz_max. 199 + * it. 209 200 * 210 201 * dts entry of array should be like: 211 - * property = /bits/ 8 <0x50 0x60 0x70>; 202 + * ``property = /bits/ 8 <0x50 0x60 0x70>;`` 203 + * 204 + * Return: The number of elements read on success, -EINVAL if the property 205 + * does not exist, -ENODATA if property does not have a value, and -EOVERFLOW 206 + * if the property data is smaller than sz_min or longer than sz_max. 212 207 * 213 208 * The out_values is modified only if a valid u8 value can be decoded. 214 209 */ ··· 253 244 * sz_min will be read. 254 245 * 255 246 * Search for a property in a device node and read 16-bit value(s) from 256 - * it. Returns number of elements read on success, -EINVAL if the property 257 - * does not exist, -ENODATA if property does not have a value, and -EOVERFLOW 258 - * if the property data is smaller than sz_min or longer than sz_max. 247 + * it. 259 248 * 260 249 * dts entry of array should be like: 261 - * property = /bits/ 16 <0x5000 0x6000 0x7000>; 250 + * ``property = /bits/ 16 <0x5000 0x6000 0x7000>;`` 251 + * 252 + * Return: The number of elements read on success, -EINVAL if the property 253 + * does not exist, -ENODATA if property does not have a value, and -EOVERFLOW 254 + * if the property data is smaller than sz_min or longer than sz_max. 262 255 * 263 256 * The out_values is modified only if a valid u16 value can be decoded. 264 257 */ ··· 303 292 * sz_min will be read. 304 293 * 305 294 * Search for a property in a device node and read 32-bit value(s) from 306 - * it. Returns number of elements read on success, -EINVAL if the property 295 + * it. 296 + * 297 + * Return: The number of elements read on success, -EINVAL if the property 307 298 * does not exist, -ENODATA if property does not have a value, and -EOVERFLOW 308 299 * if the property data is smaller than sz_min or longer than sz_max. 309 300 * ··· 344 331 * @out_value: pointer to return value, modified only if return value is 0. 345 332 * 346 333 * Search for a property in a device node and read a 64-bit value from 347 - * it. Returns 0 on success, -EINVAL if the property does not exist, 334 + * it. 335 + * 336 + * Return: 0 on success, -EINVAL if the property does not exist, 348 337 * -ENODATA if property does not have a value, and -EOVERFLOW if the 349 338 * property data isn't large enough. 350 339 * ··· 381 366 * sz_min will be read. 382 367 * 383 368 * Search for a property in a device node and read 64-bit value(s) from 384 - * it. Returns number of elements read on success, -EINVAL if the property 369 + * it. 370 + * 371 + * Return: The number of elements read on success, -EINVAL if the property 385 372 * does not exist, -ENODATA if property does not have a value, and -EOVERFLOW 386 373 * if the property data is smaller than sz_min or longer than sz_max. 387 374 * ··· 425 408 * return value is 0. 426 409 * 427 410 * Search for a property in a device tree node and retrieve a null 428 - * terminated string value (pointer to data, not a copy). Returns 0 on 429 - * success, -EINVAL if the property does not exist, -ENODATA if property 430 - * does not have a value, and -EILSEQ if the string is not null-terminated 431 - * within the length of the property data. 411 + * terminated string value (pointer to data, not a copy). 412 + * 413 + * Return: 0 on success, -EINVAL if the property does not exist, -ENODATA if 414 + * property does not have a value, and -EILSEQ if the string is not 415 + * null-terminated within the length of the property data. 432 416 * 433 417 * The out_string pointer is modified only if a valid string can be decoded. 434 418 */ ··· 793 775 * @node: pointer to a local endpoint device_node 794 776 * 795 777 * Return: Remote port node associated with remote endpoint node linked 796 - * to @node. Use of_node_put() on it when done. 778 + * to @node. Use of_node_put() on it when done. 797 779 */ 798 780 struct device_node *of_graph_get_remote_port(const struct device_node *node) 799 781 { ··· 826 808 * @endpoint: identifier (value of reg property) of the endpoint node 827 809 * 828 810 * Return: Remote device node associated with remote endpoint node linked 829 - * to @node. Use of_node_put() on it when done. 811 + * to @node. Use of_node_put() on it when done. 830 812 */ 831 813 struct device_node *of_graph_get_remote_node(const struct device_node *node, 832 814 u32 port, u32 endpoint)
+41 -22
include/linux/of.h
··· 424 424 * @sz: number of array elements to read 425 425 * 426 426 * Search for a property in a device node and read 8-bit value(s) from 427 - * it. Returns 0 on success, -EINVAL if the property does not exist, 428 - * -ENODATA if property does not have a value, and -EOVERFLOW if the 429 - * property data isn't large enough. 427 + * it. 430 428 * 431 429 * dts entry of array should be like: 432 - * property = /bits/ 8 <0x50 0x60 0x70>; 430 + * ``property = /bits/ 8 <0x50 0x60 0x70>;`` 431 + * 432 + * Return: 0 on success, -EINVAL if the property does not exist, 433 + * -ENODATA if property does not have a value, and -EOVERFLOW if the 434 + * property data isn't large enough. 433 435 * 434 436 * The out_values is modified only if a valid u8 value can be decoded. 435 437 */ ··· 456 454 * @sz: number of array elements to read 457 455 * 458 456 * Search for a property in a device node and read 16-bit value(s) from 459 - * it. Returns 0 on success, -EINVAL if the property does not exist, 460 - * -ENODATA if property does not have a value, and -EOVERFLOW if the 461 - * property data isn't large enough. 457 + * it. 462 458 * 463 459 * dts entry of array should be like: 464 - * property = /bits/ 16 <0x5000 0x6000 0x7000>; 460 + * ``property = /bits/ 16 <0x5000 0x6000 0x7000>;`` 461 + * 462 + * Return: 0 on success, -EINVAL if the property does not exist, 463 + * -ENODATA if property does not have a value, and -EOVERFLOW if the 464 + * property data isn't large enough. 465 465 * 466 466 * The out_values is modified only if a valid u16 value can be decoded. 467 467 */ ··· 489 485 * @sz: number of array elements to read 490 486 * 491 487 * Search for a property in a device node and read 32-bit value(s) from 492 - * it. Returns 0 on success, -EINVAL if the property does not exist, 488 + * it. 489 + * 490 + * Return: 0 on success, -EINVAL if the property does not exist, 493 491 * -ENODATA if property does not have a value, and -EOVERFLOW if the 494 492 * property data isn't large enough. 495 493 * ··· 519 513 * @sz: number of array elements to read 520 514 * 521 515 * Search for a property in a device node and read 64-bit value(s) from 522 - * it. Returns 0 on success, -EINVAL if the property does not exist, 516 + * it. 517 + * 518 + * Return: 0 on success, -EINVAL if the property does not exist, 523 519 * -ENODATA if property does not have a value, and -EOVERFLOW if the 524 520 * property data isn't large enough. 525 521 * ··· 1078 1070 * @propname: name of the property to be searched. 1079 1071 * 1080 1072 * Search for a property in a device node and count the number of u8 elements 1081 - * in it. Returns number of elements on sucess, -EINVAL if the property does 1073 + * in it. 1074 + * 1075 + * Return: The number of elements on sucess, -EINVAL if the property does 1082 1076 * not exist or its length does not match a multiple of u8 and -ENODATA if the 1083 1077 * property does not have a value. 1084 1078 */ ··· 1097 1087 * @propname: name of the property to be searched. 1098 1088 * 1099 1089 * Search for a property in a device node and count the number of u16 elements 1100 - * in it. Returns number of elements on sucess, -EINVAL if the property does 1090 + * in it. 1091 + * 1092 + * Return: The number of elements on sucess, -EINVAL if the property does 1101 1093 * not exist or its length does not match a multiple of u16 and -ENODATA if the 1102 1094 * property does not have a value. 1103 1095 */ ··· 1116 1104 * @propname: name of the property to be searched. 1117 1105 * 1118 1106 * Search for a property in a device node and count the number of u32 elements 1119 - * in it. Returns number of elements on sucess, -EINVAL if the property does 1107 + * in it. 1108 + * 1109 + * Return: The number of elements on sucess, -EINVAL if the property does 1120 1110 * not exist or its length does not match a multiple of u32 and -ENODATA if the 1121 1111 * property does not have a value. 1122 1112 */ ··· 1135 1121 * @propname: name of the property to be searched. 1136 1122 * 1137 1123 * Search for a property in a device node and count the number of u64 elements 1138 - * in it. Returns number of elements on sucess, -EINVAL if the property does 1124 + * in it. 1125 + * 1126 + * Return: The number of elements on sucess, -EINVAL if the property does 1139 1127 * not exist or its length does not match a multiple of u64 and -ENODATA if the 1140 1128 * property does not have a value. 1141 1129 */ ··· 1158 1142 * Search for a property in a device tree node and retrieve a list of 1159 1143 * terminated string values (pointer to data, not a copy) in that property. 1160 1144 * 1161 - * If @out_strs is NULL, the number of strings in the property is returned. 1145 + * Return: If @out_strs is NULL, the number of strings in the property is returned. 1162 1146 */ 1163 1147 static inline int of_property_read_string_array(const struct device_node *np, 1164 1148 const char *propname, const char **out_strs, ··· 1174 1158 * @propname: name of the property to be searched. 1175 1159 * 1176 1160 * Search for a property in a device tree node and retrieve the number of null 1177 - * terminated string contain in it. Returns the number of strings on 1178 - * success, -EINVAL if the property does not exist, -ENODATA if property 1179 - * does not have a value, and -EILSEQ if the string is not null-terminated 1180 - * within the length of the property data. 1161 + * terminated string contain in it. 1162 + * 1163 + * Return: The number of strings on success, -EINVAL if the property does not 1164 + * exist, -ENODATA if property does not have a value, and -EILSEQ if the string 1165 + * is not null-terminated within the length of the property data. 1181 1166 */ 1182 1167 static inline int of_property_count_strings(const struct device_node *np, 1183 1168 const char *propname) ··· 1198 1181 * Search for a property in a device tree node and retrieve a null 1199 1182 * terminated string value (pointer to data, not a copy) in the list of strings 1200 1183 * contained in that property. 1201 - * Returns 0 on success, -EINVAL if the property does not exist, -ENODATA if 1184 + * 1185 + * Return: 0 on success, -EINVAL if the property does not exist, -ENODATA if 1202 1186 * property does not have a value, and -EILSEQ if the string is not 1203 1187 * null-terminated within the length of the property data. 1204 1188 * ··· 1219 1201 * @propname: name of the property to be searched. 1220 1202 * 1221 1203 * Search for a property in a device node. 1222 - * Returns true if the property exists false otherwise. 1204 + * 1205 + * Return: true if the property exists false otherwise. 1223 1206 */ 1224 1207 static inline bool of_property_read_bool(const struct device_node *np, 1225 1208 const char *propname) ··· 1466 1447 * of_device_is_system_power_controller - Tells if system-power-controller is found for device_node 1467 1448 * @np: Pointer to the given device_node 1468 1449 * 1469 - * return true if present false otherwise 1450 + * Return: true if present false otherwise 1470 1451 */ 1471 1452 static inline bool of_device_is_system_power_controller(const struct device_node *np) 1472 1453 {