On Mon, Oct 29, 2007 at 02:46:13PM +1100, Michael Ellerman wrote:
> 
> On Fri, 2007-10-26 at 17:29 +1000, Stephen Rothwell wrote:
> > On Fri, 26 Oct 2007 16:54:43 +1000 (EST) Michael Ellerman <[EMAIL 
> > PROTECTED]> wrote:
> > >
> > > - dn = pdn->node->child;
> > > - while (dn) {
> > > + for (dn = NULL; (dn = of_get_next_child(pdn->node, dn));)
> > 
> > Just wondering if we need
> > 
> > #define for_each_child_node(dn, parent) \
> >     for (dn = of_get_next_child(parent, NULL); dn; \
> >             dn = of_get_next_child(parent, dn))

Yes, I like this much better too, if for no other reason than
the for-loop tructure is more orthodox.

> Should we perhaps make it for_each_child_device_node() ?

foreach_of_device_node_child() or

of_foreach_device_node_child()

_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Reply via email to