[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v7 1/8] xen/arm: pass node to device_tree_for_each_node

On 8/19/19 6:43 PM, Stefano Stabellini wrote:
@@ -85,20 +86,22 @@ static u32 __init device_tree_get_u32(const void *fdt, int 
   * Returns 0 if all nodes were iterated over successfully.  If @func
   * returns a value different from 0, that value is returned immediately.
-int __init device_tree_for_each_node(const void *fdt,
+int __init device_tree_for_each_node(const void *fdt, int node,
                                       device_tree_node_func func,
                                       void *data)
-    int node;
-    int depth;
+    /*
+     * We only care about relative depth increments, assume depth of
+     * node is 0 for simplicity.
+     */
+    int depth = 0;
+    const int min_depth = depth;

There is no need to define min_depth here. With min_depth dropped:

Acked-by: Julien Grall <julien.grall@xxxxxxx>


Julien Grall

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.