All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: David Miller <davem@davemloft.net>
Cc: sparclinux@vger.kernel.org, paulus@samba.org,
	linuxppc-dev@ozlabs.org, sfr@canb.auug.org.au
Subject: Re: [PATCH 2/2] Use of_get_pci_dev_node() in axon_msi.c
Date: Wed, 17 Oct 2007 21:36:30 +1000	[thread overview]
Message-ID: <1192620990.11899.168.camel@pasglop> (raw)
In-Reply-To: <20071017.042229.95059231.davem@davemloft.net>


> I find it ironic that you add of_get_pci_dev_node() as a function
> which gets the node and grabs a reference to it, and then the very
> first usage you make of it doesn't drop the reference at all.
> 
> That reference grabbing aspect of the new interface is obviously very
> useful! :-)
> 
> Kidding aside (I realize that in this case probably the driver never
> unregisters and therefore the reference never needs to be released)
> it's really much nicer to add facilities when you have patches in hand
> that actually use them.

I think in this case, it's mostly a matter of consistency... pretty much
everything that returns a device_node grabs a reference... except
pci_device_to_OF_node :-)

I think Michael is trying to address that, and axon-msi happens to be
something he wrote so a good candidate for an initial conversion :-)

Cheers,
Ben.

WARNING: multiple messages have this Message-ID (diff)
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: David Miller <davem@davemloft.net>
Cc: sparclinux@vger.kernel.org, paulus@samba.org,
	linuxppc-dev@ozlabs.org, sfr@canb.auug.org.au
Subject: Re: [PATCH 2/2] Use of_get_pci_dev_node() in axon_msi.c
Date: Wed, 17 Oct 2007 11:36:30 +0000	[thread overview]
Message-ID: <1192620990.11899.168.camel@pasglop> (raw)
In-Reply-To: <20071017.042229.95059231.davem@davemloft.net>


> I find it ironic that you add of_get_pci_dev_node() as a function
> which gets the node and grabs a reference to it, and then the very
> first usage you make of it doesn't drop the reference at all.
> 
> That reference grabbing aspect of the new interface is obviously very
> useful! :-)
> 
> Kidding aside (I realize that in this case probably the driver never
> unregisters and therefore the reference never needs to be released)
> it's really much nicer to add facilities when you have patches in hand
> that actually use them.

I think in this case, it's mostly a matter of consistency... pretty much
everything that returns a device_node grabs a reference... except
pci_device_to_OF_node :-)

I think Michael is trying to address that, and axon-msi happens to be
something he wrote so a good candidate for an initial conversion :-)

Cheers,
Ben.



  parent reply	other threads:[~2007-10-17 11:36 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-17  7:12 [PATCH 1/2] Introduce of_get_pci_dev_node() Michael Ellerman
2007-10-17  7:12 ` [PATCH 2/2] Use of_get_pci_dev_node() in axon_msi.c Michael Ellerman
2007-10-17 11:22   ` David Miller
2007-10-17 11:22     ` David Miller
2007-10-17 11:23     ` David Miller
2007-10-17 11:23       ` David Miller
2007-10-18  1:23       ` Michael Ellerman
2007-10-18  1:23         ` Michael Ellerman
2007-10-17 11:36     ` Benjamin Herrenschmidt [this message]
2007-10-17 11:36       ` Benjamin Herrenschmidt
2007-10-18  1:30       ` Michael Ellerman
2007-10-18  1:30         ` Michael Ellerman
2007-10-17 23:04   ` Linas Vepstas
2007-10-17 23:04     ` Linas Vepstas
2007-10-18  1:27     ` Michael Ellerman
2007-10-18  1:27       ` Michael Ellerman
2007-10-18 19:09       ` Linas Vepstas
2007-10-18 19:09         ` Linas Vepstas
2007-10-23  7:36         ` Michael Ellerman
2007-10-23  7:36           ` Michael Ellerman
2007-10-23  7:40           ` Benjamin Herrenschmidt
2007-10-23  7:40             ` Benjamin Herrenschmidt
2007-10-18  5:22     ` Stephen Rothwell
2007-10-18  5:22       ` Stephen Rothwell

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=1192620990.11899.168.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=davem@davemloft.net \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.org \
    --cc=sfr@canb.auug.org.au \
    --cc=sparclinux@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.