[RFC/PATCH 4/4] Add support for MSI on Axon-based Cell systems
Segher Boessenkool
segher at kernel.crashing.org
Sat Jun 9 06:16:48 EST 2007
> 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
More information about the Linuxppc-dev
mailing list