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

of: Fix kerneldoc output formatting

The indentation of the kerneldoc comments affects the output formatting.
Leading tabs in particular don't work, sections need to be indented
under the section header, and several code blocks are reformatted.

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/20210326192606.3702739-1-robh@kernel.org

+136 -138
+132 -133
drivers/of/base.c
··· 651 651 EXPORT_SYMBOL(of_device_is_big_endian); 652 652 653 653 /** 654 - * of_get_parent - Get a node's parent if any 655 - * @node: Node to get parent 654 + * of_get_parent - Get a node's parent if any 655 + * @node: Node to get parent 656 656 * 657 - * Returns a node pointer with refcount incremented, use 658 - * of_node_put() on it when done. 657 + * Return: A node pointer with refcount incremented, use 658 + * of_node_put() on it when done. 659 659 */ 660 660 struct device_node *of_get_parent(const struct device_node *node) 661 661 { ··· 673 673 EXPORT_SYMBOL(of_get_parent); 674 674 675 675 /** 676 - * of_get_next_parent - Iterate to a node's parent 677 - * @node: Node to get parent of 676 + * of_get_next_parent - Iterate to a node's parent 677 + * @node: Node to get parent of 678 678 * 679 - * This is like of_get_parent() except that it drops the 680 - * refcount on the passed node, making it suitable for iterating 681 - * through a node's parents. 679 + * This is like of_get_parent() except that it drops the 680 + * refcount on the passed node, making it suitable for iterating 681 + * through a node's parents. 682 682 * 683 - * Returns a node pointer with refcount incremented, use 684 - * of_node_put() on it when done. 683 + * Return: A node pointer with refcount incremented, use 684 + * of_node_put() on it when done. 685 685 */ 686 686 struct device_node *of_get_next_parent(struct device_node *node) 687 687 { ··· 719 719 child = __of_get_next_child(parent, child)) 720 720 721 721 /** 722 - * of_get_next_child - Iterate a node childs 723 - * @node: parent node 724 - * @prev: previous child of the parent node, or NULL to get first 722 + * of_get_next_child - Iterate a node childs 723 + * @node: parent node 724 + * @prev: previous child of the parent node, or NULL to get first 725 725 * 726 - * Returns a node pointer with refcount incremented, use of_node_put() on 727 - * it when done. Returns NULL when prev is the last child. Decrements the 728 - * refcount of prev. 726 + * Return: A node pointer with refcount incremented, use of_node_put() on 727 + * it when done. Returns NULL when prev is the last child. Decrements the 728 + * refcount of prev. 729 729 */ 730 730 struct device_node *of_get_next_child(const struct device_node *node, 731 731 struct device_node *prev) ··· 741 741 EXPORT_SYMBOL(of_get_next_child); 742 742 743 743 /** 744 - * of_get_next_available_child - Find the next available child node 745 - * @node: parent node 746 - * @prev: previous child of the parent node, or NULL to get first 744 + * of_get_next_available_child - Find the next available child node 745 + * @node: parent node 746 + * @prev: previous child of the parent node, or NULL to get first 747 747 * 748 - * This function is like of_get_next_child(), except that it 749 - * automatically skips any disabled nodes (i.e. status = "disabled"). 748 + * This function is like of_get_next_child(), except that it 749 + * automatically skips any disabled nodes (i.e. status = "disabled"). 750 750 */ 751 751 struct device_node *of_get_next_available_child(const struct device_node *node, 752 752 struct device_node *prev) ··· 772 772 EXPORT_SYMBOL(of_get_next_available_child); 773 773 774 774 /** 775 - * of_get_next_cpu_node - Iterate on cpu nodes 776 - * @prev: previous child of the /cpus node, or NULL to get first 775 + * of_get_next_cpu_node - Iterate on cpu nodes 776 + * @prev: previous child of the /cpus node, or NULL to get first 777 777 * 778 - * Returns a cpu node pointer with refcount incremented, use of_node_put() 779 - * on it when done. Returns NULL when prev is the last child. Decrements 780 - * the refcount of prev. 778 + * Return: A cpu node pointer with refcount incremented, use of_node_put() 779 + * on it when done. Returns NULL when prev is the last child. Decrements 780 + * the refcount of prev. 781 781 */ 782 782 struct device_node *of_get_next_cpu_node(struct device_node *prev) 783 783 { ··· 834 834 EXPORT_SYMBOL(of_get_compatible_child); 835 835 836 836 /** 837 - * of_get_child_by_name - Find the child node by name for a given parent 838 - * @node: parent node 839 - * @name: child name to look for. 837 + * of_get_child_by_name - Find the child node by name for a given parent 838 + * @node: parent node 839 + * @name: child name to look for. 840 840 * 841 - * This function looks for child node for given matching name 841 + * This function looks for child node for given matching name 842 842 * 843 - * Returns a node pointer if found, with refcount incremented, use 844 - * of_node_put() on it when done. 845 - * Returns NULL if node is not found. 843 + * Return: A node pointer if found, with refcount incremented, use 844 + * of_node_put() on it when done. 845 + * Returns NULL if node is not found. 846 846 */ 847 847 struct device_node *of_get_child_by_name(const struct device_node *node, 848 848 const char *name) ··· 893 893 } 894 894 895 895 /** 896 - * of_find_node_opts_by_path - Find a node matching a full OF path 897 - * @path: Either the full path to match, or if the path does not 898 - * start with '/', the name of a property of the /aliases 899 - * node (an alias). In the case of an alias, the node 900 - * matching the alias' value will be returned. 901 - * @opts: Address of a pointer into which to store the start of 902 - * an options string appended to the end of the path with 903 - * a ':' separator. 896 + * of_find_node_opts_by_path - Find a node matching a full OF path 897 + * @path: Either the full path to match, or if the path does not 898 + * start with '/', the name of a property of the /aliases 899 + * node (an alias). In the case of an alias, the node 900 + * matching the alias' value will be returned. 901 + * @opts: Address of a pointer into which to store the start of 902 + * an options string appended to the end of the path with 903 + * a ':' separator. 904 904 * 905 - * Valid paths: 906 - * /foo/bar Full path 907 - * foo Valid alias 908 - * foo/bar Valid alias + relative path 905 + * Valid paths: 906 + * * /foo/bar Full path 907 + * * foo Valid alias 908 + * * foo/bar Valid alias + relative path 909 909 * 910 - * Returns a node pointer with refcount incremented, use 911 - * of_node_put() on it when done. 910 + * Return: A node pointer with refcount incremented, use 911 + * of_node_put() on it when done. 912 912 */ 913 913 struct device_node *of_find_node_opts_by_path(const char *path, const char **opts) 914 914 { ··· 958 958 EXPORT_SYMBOL(of_find_node_opts_by_path); 959 959 960 960 /** 961 - * of_find_node_by_name - Find a node by its "name" property 962 - * @from: The node to start searching from or NULL; the node 961 + * of_find_node_by_name - Find a node by its "name" property 962 + * @from: The node to start searching from or NULL; the node 963 963 * you pass will not be searched, only the next one 964 964 * will. Typically, you pass what the previous call 965 965 * returned. of_node_put() will be called on @from. 966 - * @name: The name string to match against 966 + * @name: The name string to match against 967 967 * 968 - * Returns a node pointer with refcount incremented, use 969 - * of_node_put() on it when done. 968 + * Return: A node pointer with refcount incremented, use 969 + * of_node_put() on it when done. 970 970 */ 971 971 struct device_node *of_find_node_by_name(struct device_node *from, 972 972 const char *name) ··· 985 985 EXPORT_SYMBOL(of_find_node_by_name); 986 986 987 987 /** 988 - * of_find_node_by_type - Find a node by its "device_type" property 989 - * @from: The node to start searching from, or NULL to start searching 988 + * of_find_node_by_type - Find a node by its "device_type" property 989 + * @from: The node to start searching from, or NULL to start searching 990 990 * the entire device tree. The node you pass will not be 991 991 * searched, only the next one will; typically, you pass 992 992 * what the previous call returned. of_node_put() will be 993 993 * called on from for you. 994 - * @type: The type string to match against 994 + * @type: The type string to match against 995 995 * 996 - * Returns a node pointer with refcount incremented, use 997 - * of_node_put() on it when done. 996 + * Return: A node pointer with refcount incremented, use 997 + * of_node_put() on it when done. 998 998 */ 999 999 struct device_node *of_find_node_by_type(struct device_node *from, 1000 1000 const char *type) ··· 1013 1013 EXPORT_SYMBOL(of_find_node_by_type); 1014 1014 1015 1015 /** 1016 - * of_find_compatible_node - Find a node based on type and one of the 1016 + * of_find_compatible_node - Find a node based on type and one of the 1017 1017 * tokens in its "compatible" property 1018 - * @from: The node to start searching from or NULL, the node 1019 - * you pass will not be searched, only the next one 1020 - * will; typically, you pass what the previous call 1021 - * returned. of_node_put() will be called on it 1022 - * @type: The type string to match "device_type" or NULL to ignore 1023 - * @compatible: The string to match to one of the tokens in the device 1024 - * "compatible" list. 1018 + * @from: The node to start searching from or NULL, the node 1019 + * you pass will not be searched, only the next one 1020 + * will; typically, you pass what the previous call 1021 + * returned. of_node_put() will be called on it 1022 + * @type: The type string to match "device_type" or NULL to ignore 1023 + * @compatible: The string to match to one of the tokens in the device 1024 + * "compatible" list. 1025 1025 * 1026 - * Returns a node pointer with refcount incremented, use 1027 - * of_node_put() on it when done. 1026 + * Return: A node pointer with refcount incremented, use 1027 + * of_node_put() on it when done. 1028 1028 */ 1029 1029 struct device_node *of_find_compatible_node(struct device_node *from, 1030 1030 const char *type, const char *compatible) ··· 1044 1044 EXPORT_SYMBOL(of_find_compatible_node); 1045 1045 1046 1046 /** 1047 - * of_find_node_with_property - Find a node which has a property with 1048 - * the given name. 1049 - * @from: The node to start searching from or NULL, the node 1050 - * you pass will not be searched, only the next one 1051 - * will; typically, you pass what the previous call 1052 - * returned. of_node_put() will be called on it 1053 - * @prop_name: The name of the property to look for. 1047 + * of_find_node_with_property - Find a node which has a property with 1048 + * the given name. 1049 + * @from: The node to start searching from or NULL, the node 1050 + * you pass will not be searched, only the next one 1051 + * will; typically, you pass what the previous call 1052 + * returned. of_node_put() will be called on it 1053 + * @prop_name: The name of the property to look for. 1054 1054 * 1055 - * Returns a node pointer with refcount incremented, use 1056 - * of_node_put() on it when done. 1055 + * Return: A node pointer with refcount incremented, use 1056 + * of_node_put() on it when done. 1057 1057 */ 1058 1058 struct device_node *of_find_node_with_property(struct device_node *from, 1059 1059 const char *prop_name) ··· 1102 1102 1103 1103 /** 1104 1104 * of_match_node - Tell if a device_node has a matching of_match structure 1105 - * @matches: array of of device match structures to search in 1106 - * @node: the of device structure to match against 1105 + * @matches: array of of device match structures to search in 1106 + * @node: the of device structure to match against 1107 1107 * 1108 - * Low level utility function used by device matching. 1108 + * Low level utility function used by device matching. 1109 1109 */ 1110 1110 const struct of_device_id *of_match_node(const struct of_device_id *matches, 1111 1111 const struct device_node *node) ··· 1121 1121 EXPORT_SYMBOL(of_match_node); 1122 1122 1123 1123 /** 1124 - * of_find_matching_node_and_match - Find a node based on an of_device_id 1125 - * match table. 1126 - * @from: The node to start searching from or NULL, the node 1127 - * you pass will not be searched, only the next one 1128 - * will; typically, you pass what the previous call 1129 - * returned. of_node_put() will be called on it 1130 - * @matches: array of of device match structures to search in 1131 - * @match: Updated to point at the matches entry which matched 1124 + * of_find_matching_node_and_match - Find a node based on an of_device_id 1125 + * match table. 1126 + * @from: The node to start searching from or NULL, the node 1127 + * you pass will not be searched, only the next one 1128 + * will; typically, you pass what the previous call 1129 + * returned. of_node_put() will be called on it 1130 + * @matches: array of of device match structures to search in 1131 + * @match: Updated to point at the matches entry which matched 1132 1132 * 1133 - * Returns a node pointer with refcount incremented, use 1134 - * of_node_put() on it when done. 1133 + * Return: A node pointer with refcount incremented, use 1134 + * of_node_put() on it when done. 1135 1135 */ 1136 1136 struct device_node *of_find_matching_node_and_match(struct device_node *from, 1137 1137 const struct of_device_id *matches, ··· 1460 1460 * Caller is responsible to call of_node_put() on the returned out_args->np 1461 1461 * pointer. 1462 1462 * 1463 - * Example: 1463 + * Example:: 1464 1464 * 1465 - * phandle1: node1 { 1465 + * phandle1: node1 { 1466 1466 * #list-cells = <2>; 1467 - * } 1467 + * }; 1468 1468 * 1469 - * phandle2: node2 { 1469 + * phandle2: node2 { 1470 1470 * #list-cells = <1>; 1471 - * } 1471 + * }; 1472 1472 * 1473 - * node3 { 1473 + * node3 { 1474 1474 * list = <&phandle1 1 2 &phandle2 3>; 1475 - * } 1475 + * }; 1476 1476 * 1477 - * To get a device_node of the `node2' node you may call this: 1477 + * To get a device_node of the ``node2`` node you may call this: 1478 1478 * of_parse_phandle_with_args(node3, "list", "#list-cells", 1, &args); 1479 1479 */ 1480 1480 int of_parse_phandle_with_args(const struct device_node *np, const char *list_name, ··· 1512 1512 * Caller is responsible to call of_node_put() on the returned out_args->np 1513 1513 * pointer. 1514 1514 * 1515 - * Example: 1515 + * Example:: 1516 1516 * 1517 - * phandle1: node1 { 1518 - * #list-cells = <2>; 1519 - * } 1517 + * phandle1: node1 { 1518 + * #list-cells = <2>; 1519 + * }; 1520 1520 * 1521 - * phandle2: node2 { 1522 - * #list-cells = <1>; 1523 - * } 1521 + * phandle2: node2 { 1522 + * #list-cells = <1>; 1523 + * }; 1524 1524 * 1525 - * phandle3: node3 { 1526 - * #list-cells = <1>; 1527 - * list-map = <0 &phandle2 3>, 1528 - * <1 &phandle2 2>, 1529 - * <2 &phandle1 5 1>; 1530 - * list-map-mask = <0x3>; 1531 - * }; 1525 + * phandle3: node3 { 1526 + * #list-cells = <1>; 1527 + * list-map = <0 &phandle2 3>, 1528 + * <1 &phandle2 2>, 1529 + * <2 &phandle1 5 1>; 1530 + * list-map-mask = <0x3>; 1531 + * }; 1532 1532 * 1533 - * node4 { 1534 - * list = <&phandle1 1 2 &phandle3 0>; 1535 - * } 1533 + * node4 { 1534 + * list = <&phandle1 1 2 &phandle3 0>; 1535 + * }; 1536 1536 * 1537 - * To get a device_node of the `node2' node you may call this: 1537 + * To get a device_node of the ``node2`` node you may call this: 1538 1538 * of_parse_phandle_with_args(node4, "list", "list", 1, &args); 1539 1539 */ 1540 1540 int of_parse_phandle_with_args_map(const struct device_node *np, ··· 1694 1694 * Caller is responsible to call of_node_put() on the returned out_args->np 1695 1695 * pointer. 1696 1696 * 1697 - * Example: 1697 + * Example:: 1698 1698 * 1699 - * phandle1: node1 { 1700 - * } 1699 + * phandle1: node1 { 1700 + * }; 1701 1701 * 1702 - * phandle2: node2 { 1703 - * } 1702 + * phandle2: node2 { 1703 + * }; 1704 1704 * 1705 - * node3 { 1706 - * list = <&phandle1 0 2 &phandle2 2 3>; 1707 - * } 1705 + * node3 { 1706 + * list = <&phandle1 0 2 &phandle2 2 3>; 1707 + * }; 1708 1708 * 1709 - * To get a device_node of the `node2' node you may call this: 1709 + * To get a device_node of the ``node2`` node you may call this: 1710 1710 * of_parse_phandle_with_fixed_args(node3, "list", 2, 1, &args); 1711 1711 */ 1712 1712 int of_parse_phandle_with_fixed_args(const struct device_node *np, ··· 1952 1952 1953 1953 /** 1954 1954 * of_alias_scan - Scan all properties of the 'aliases' node 1955 + * @dt_alloc: An allocator that provides a virtual address to memory 1956 + * for storing the resulting tree 1955 1957 * 1956 1958 * The function scans all the properties of the 'aliases' node and populates 1957 1959 * the global lookup table with the properties. It returns the 1958 1960 * number of alias properties found, or an error code in case of failure. 1959 - * 1960 - * @dt_alloc: An allocator that provides a virtual address to memory 1961 - * for storing the resulting tree 1962 1961 */ 1963 1962 void of_alias_scan(void * (*dt_alloc)(u64 size, u64 align)) 1964 1963 { ··· 2152 2153 EXPORT_SYMBOL_GPL(of_console_check); 2153 2154 2154 2155 /** 2155 - * of_find_next_cache_node - Find a node's subsidiary cache 2156 - * @np: node of type "cpu" or "cache" 2156 + * of_find_next_cache_node - Find a node's subsidiary cache 2157 + * @np: node of type "cpu" or "cache" 2157 2158 * 2158 - * Returns a node pointer with refcount incremented, use 2159 - * of_node_put() on it when done. Caller should hold a reference 2160 - * to np. 2159 + * Return: A node pointer with refcount incremented, use 2160 + * of_node_put() on it when done. Caller should hold a reference 2161 + * to np. 2161 2162 */ 2162 2163 struct device_node *of_find_next_cache_node(const struct device_node *np) 2163 2164 {
+4 -5
drivers/of/fdt.c
··· 349 349 350 350 /** 351 351 * __unflatten_device_tree - create tree of device_nodes from flat blob 352 - * 353 - * unflattens a device-tree, creating the 354 - * tree of struct device_node. It also fills the "name" and "type" 355 - * pointers of the nodes so the normal device-tree walking functions 356 - * can be used. 357 352 * @blob: The blob to expand 358 353 * @dad: Parent device node 359 354 * @mynodes: The device_node tree created by the call 360 355 * @dt_alloc: An allocator that provides a virtual address to memory 361 356 * for the resulting tree 362 357 * @detached: if true set OF_DETACHED on @mynodes 358 + * 359 + * unflattens a device-tree, creating the tree of struct device_node. It also 360 + * fills the "name" and "type" pointers of the nodes so the normal device-tree 361 + * walking functions can be used. 363 362 * 364 363 * Returns NULL on failure or the memory chunk containing the unflattened 365 364 * device tree on success.