WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ppc-devel

[XenPPC] [pushed][ppc] Fixed bug in ofd find by property.

To: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Subject: [XenPPC] [pushed][ppc] Fixed bug in ofd find by property.
From: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
Date: Fri, 24 Mar 2006 16:40:01 -0500
Delivery-date: Fri, 24 Mar 2006 22:45:05 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ppc-devel-request@lists.xensource.com?subject=help>
List-id: Xen PPC development <xen-ppc-devel.lists.xensource.com>
List-post: <mailto:xen-ppc-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
changeset:   9644:347b0f87cbd3
tag:         tip
user:        jimix@xxxxxxxxxxxxxxxxxxxxx
date:        Fri Mar 24 15:33:02 2006 -0500
summary:     [ppc] Fixed bug in ofd find by property.

diff -r e40d7c179f74 -r 347b0f87cbd3 xen/arch/ppc/of-devtree.c
--- a/xen/arch/ppc/of-devtree.c Fri Mar 24 15:32:41 2006 -0500
+++ b/xen/arch/ppc/of-devtree.c Fri Mar 24 15:33:02 2006 -0500
@@ -865,7 +865,7 @@ static ofdn_t ofd_find_by_prop(
 static ofdn_t ofd_find_by_prop(
     struct ofd_mem *m,
     ofdn_t head,
-    ofdn_t prev,
+    ofdn_t *prev_p,
     ofdn_t n,
     const char *name,
     const void *val,
@@ -893,22 +893,22 @@ retry:
             }
         }
         if ( match == 1 ) {
-            if ( prev >= 0 ) {
-                np = ofd_node_get(m, prev);
+            if ( *prev_p >= 0 ) {
+                np = ofd_node_get(m, *prev_p);
                 np->on_next = n;
             } else {
                 head = n;
             }
             np = ofd_node_get(m, n);
-            np->on_prev = prev;
+            np->on_prev = *prev_p;
             np->on_next = -1;
-            prev = n;
+            *prev_p = n;
         }
     }
 
     p = ofd_node_child(m, n);
     if ( p > 0 ) {
-        head = ofd_find_by_prop(m, head, prev, p, name, val, sz);
+        head = ofd_find_by_prop(m, head, prev_p, p, name, val, sz);
     }
 
     p = ofd_node_peer(m, n);
@@ -933,7 +933,8 @@ ofdn_t ofd_node_find_by_prop(
         n = OFD_ROOT;
     }
 
-    return ofd_find_by_prop(m, -1, -1, n, name, val, sz);
+    ofdn_t prev = -1;
+    return ofd_find_by_prop(m, -1, &prev, n, name, val, sz);
 }
 
 ofdn_t ofd_node_find_next(void *mem, ofdn_t n)



_______________________________________________
Xen-ppc-devel mailing list
Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ppc-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [XenPPC] [pushed][ppc] Fixed bug in ofd find by property., Jimi Xenidis <=