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

Michael Ellerman michael at ellerman.id.au
Tue Jun 12 12:30:04 EST 2007


On Fri, 2007-06-08 at 22:06 +0200, Segher Boessenkool wrote:
> >> That wasn't my question though?
> >
> > Sorry, I misread this. The of_node_get is done because we keep
> > a reference to the device node in the axon_msic struct. There is
> > no module_exit function in the driver that could clean up the
> > axon_msic, so we must never have an of_node_put as far as I
> > understand.
> 
> >>>>>> +               if (axon_msi_setup_one(of_node_get(node)) == 0)
> >>>>>> +                       found++;
> 
> What if axon_msi_setup_one() returns an error?  Sounds
> to me like the get() should be inside that function no
> matter what?

It drops the ref if there's an error.

> If the reference counting isn't obvious, it is obviously
> wrong ;-)

But if it is obvious it may well be unobviously wrong, which is
better? ;)

I'll rework it.

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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20070612/e03abcf8/attachment.pgp>


More information about the Linuxppc-dev mailing list