[PATCH 11/16] Use of_get_next_child() in eeh_restore_bars()
Linas Vepstas
linas at austin.ibm.com
Tue Nov 6 06:23:12 EST 2007
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 <michael at ellerman.id.au> 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()
More information about the Linuxppc-dev
mailing list