From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTP id 497DEDDE9B for ; Wed, 17 Oct 2007 21:36:52 +1000 (EST) Subject: Re: [PATCH 2/2] Use of_get_pci_dev_node() in axon_msi.c From: Benjamin Herrenschmidt To: David Miller In-Reply-To: <20071017.042229.95059231.davem@davemloft.net> References: <8f76815cbbaf5fbab82c843d87bc0dafab038c80.1192605144.git.michael@ellerman.id.au> <20071017.042229.95059231.davem@davemloft.net> Content-Type: text/plain Date: Wed, 17 Oct 2007 21:36:30 +1000 Message-Id: <1192620990.11899.168.camel@pasglop> Mime-Version: 1.0 Cc: sparclinux@vger.kernel.org, paulus@samba.org, linuxppc-dev@ozlabs.org, sfr@canb.auug.org.au Reply-To: benh@kernel.crashing.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , > 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.