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 
node,
   * 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.gr...@arm.com>

Cheers,

--
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to