linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <michael@ellerman.id.au>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: linuxppc-dev@ozlabs.org, "David S.Miller" <davem@davemloft.net>
Subject: Re: [PATCH 11/16] Use of_get_next_child() in eeh_restore_bars()
Date: Mon, 29 Oct 2007 14:46:13 +1100	[thread overview]
Message-ID: <1193629573.7280.11.camel@concordia> (raw)
In-Reply-To: <20071026172909.f7a085e9.sfr@canb.auug.org.au>

[-- Attachment #1: Type: text/plain, Size: 1284 bytes --]


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@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))

Hmm, perhaps. I count ~30 places we could use it under arch/powerpc, and
about another ~20 in drivers/.

If no one objects, I guess I'll get to it, sigh ... another Yak.

Should we perhaps make it for_each_child_device_node() ?
Otherwise it's slightly non obvious what kind of node it's talking
about, especially in driver code.

cheers

-- 
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2007-10-29  3:46 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-26  6:54 [PATCH 01/16] Add of_get_next_parent() Michael Ellerman
2007-10-26  6:54 ` [PATCH 02/16] Use of_get_next_parent() in pci_dma_bus_setup_pSeries() Michael Ellerman
2007-10-26  6:54 ` [PATCH 03/16] Use of_get_next_parent() in pci_dma_bus_setup_pSeriesLP() Michael Ellerman
2007-10-26  6:54 ` [PATCH 04/16] Use of_get_next_parent() in pci_dma_dev_setup_pSeries() Michael Ellerman
2007-10-26  6:54 ` [PATCH 05/16] Use of_get_next_parent() in pci_dma_dev_setup_pSeriesLP() Michael Ellerman
2007-10-26  6:54 ` [PATCH 06/16] Use of_get_next_child() in pci_dma_bus_setup_pSeries() Michael Ellerman
2007-10-26  6:54 ` [PATCH 07/16] Use of_get_next_parent() in xics_setup_8259_cascade() Michael Ellerman
2007-10-26  6:54 ` [PATCH 08/16] Use of_get_next_parent() in pseries_mpic_init_IRQ() Michael Ellerman
2007-10-26  6:54 ` [PATCH 09/16] Use of_get_next_parent() in axon_msi.c Michael Ellerman
2007-10-26  7:24   ` Stephen Rothwell
2007-10-26  6:54 ` [PATCH 10/16] Use of_get_next_child() in EEH gather_pci_data() Michael Ellerman
2007-10-26  6:54 ` [PATCH 11/16] Use of_get_next_child() in eeh_restore_bars() Michael Ellerman
2007-10-26  7:29   ` Stephen Rothwell
2007-10-29  3:46     ` Michael Ellerman [this message]
2007-11-05 19:23       ` Linas Vepstas
2007-10-26  6:54 ` [PATCH 12/16] Use of_get_next_child() in eeh_add_device_tree_early() Michael Ellerman
2007-10-26  6:54 ` [PATCH 13/16] Use of_get_next_child() in __eeh_mark_slot() Michael Ellerman
2007-10-26  6:54 ` [PATCH 14/16] Use of_get_next_child() in __eeh_clear_slot() Michael Ellerman
2007-10-26  6:54 ` [PATCH 15/16] Use of_get_next_child() in eeh_reset_device() Michael Ellerman
2007-10-26  6:54 ` [PATCH 16/16] Use of_get_next_child() in EEH print_device_node_tree() Michael Ellerman
2007-10-26 10:38 ` [PATCH 01/16] Add of_get_next_parent() David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1193629573.7280.11.camel@concordia \
    --to=michael@ellerman.id.au \
    --cc=davem@davemloft.net \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=sfr@canb.auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).