Subject: Re: [RFC/PATCH 4/4] Add support for MSI on Axon-based Cell systems

From: Segher Boessenkool <[email-masked]>
Date: Fri, 8 Jun 2007 22:16:48 +0200

> If you do
>
> for_each_compatible_node(node, NULL, "foo") {
> 	do_something(node);
> }
>
> then the reference count is held just as long as the do_something()
> function is run,

Yeah.  so (like we discussed on irc) the of_node_get() in
the code under discussion should really be done inside the
axon_msi_setup_one() function.

> and if you do
>
> for_each_compatible_node(node, NULL, "foo")
> 	if (conditional_func(node))
> 		break;
>
> then the node variable will have the reference count.

Yes.  This is bad form though, "for_each" means for
_each_, open coding the loop would be clearer IMHO.

Segher