linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: Jia Hongtao <B38951@freescale.com>
Cc: linuxppc-dev@lists.ozlabs.org, Bradley Hughes <bhughes@silicontkx.com>
Subject: Re: [PATCH V8] powerpc/fsl-pci: Unify pci/pcie initialization code
Date: Mon, 20 Aug 2012 19:56:40 -0500	[thread overview]
Message-ID: <5032DCC8.1040005@freescale.com> (raw)
In-Reply-To: <5032B455.3080607@freescale.com>

On 08/20/2012 05:04 PM, Scott Wood wrote:
> On 08/20/2012 05:06 AM, Jia Hongtao wrote:
>> @@ -842,38 +839,60 @@ void __devinit fsl_pci_init(void)
>>  			node = fsl_pci_primary;
>>  
>>  			if (of_match_node(pci_ids, node))
>> -				break;
>> +				return;
>>  		}
>> -	}
>>  
>> -	node = NULL;
>> -	for_each_node_by_type(node, "pci") {
>> -		if (of_match_node(pci_ids, node)) {
>> +		node = of_find_node_by_type(NULL, "pci");
>> +		if (of_match_node(pci_ids, node))
>>
> 
> What if the node returned doesn't match?  If you're checking for this,
> handle the else-case (even if just with an error message).

Or just use of_find_matching_node().

Also, we probably need to check of_device_is_available() here (like
fsl_add_bridge does), and move on to the next PCI bus if it's disabled.

-Scott

  reply	other threads:[~2012-08-21  0:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-20 10:06 [PATCH V8] powerpc/fsl-pci: Unify pci/pcie initialization code Jia Hongtao
2012-08-20 22:04 ` Scott Wood
2012-08-21  0:56   ` Scott Wood [this message]
2012-08-21  3:27     ` Jia Hongtao-B38951
2012-08-21  3:26   ` Jia Hongtao-B38951
2012-08-21  6:49     ` Li Yang-R58472
2012-08-21 17:16       ` Scott Wood
2012-08-21 18:09         ` Li Yang-R58472
2012-08-21 18:24           ` Scott Wood
2012-08-21 18:33     ` Scott Wood
2012-08-22  7:41   ` Jia Hongtao-B38951
  -- strict thread matches above, loose matches on Subject: below --
2012-08-20  9:55 Jia Hongtao

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=5032DCC8.1040005@freescale.com \
    --to=scottwood@freescale.com \
    --cc=B38951@freescale.com \
    --cc=bhughes@silicontkx.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    /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).