[PATCH 11/16] Use of_get_next_child() in eeh_restore_bars()

Stephen Rothwell sfr at canb.auug.org.au
Fri Oct 26 17:29:09 EST 2007


On Fri, 26 Oct 2007 16:54:43 +1000 (EST) Michael Ellerman <michael at ellerman.id.au> wrote:
>
> +++ b/arch/powerpc/platforms/pseries/eeh.c
> @@ -841,11 +841,8 @@ void eeh_restore_bars(struct pci_dn *pdn)
>  	if ((pdn->eeh_mode & EEH_MODE_SUPPORTED) && !IS_BRIDGE(pdn->class_code))
>  		__restore_bars (pdn);
>  
> -	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))

-- 
Cheers,
Stephen Rothwell                    sfr at canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20071026/e3126be9/attachment.pgp>


More information about the Linuxppc-dev mailing list