From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LtLGP-00056b-KO for qemu-devel@nongnu.org; Mon, 13 Apr 2009 08:27:49 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LtLGL-00055v-2h for qemu-devel@nongnu.org; Mon, 13 Apr 2009 08:27:49 -0400 Received: from [199.232.76.173] (port=36788 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LtLGK-00055s-SD for qemu-devel@nongnu.org; Mon, 13 Apr 2009 08:27:44 -0400 Received: from mx20.gnu.org ([199.232.41.8]:34914) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LtLGK-0000MO-KH for qemu-devel@nongnu.org; Mon, 13 Apr 2009 08:27:44 -0400 Received: from mail.codesourcery.com ([65.74.133.4]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LtLGI-0005PV-Ey for qemu-devel@nongnu.org; Mon, 13 Apr 2009 08:27:42 -0400 From: Paul Brook Subject: Re: [Qemu-devel] [patch 2/2] qemu: switch pci device init functions to accept devfn Date: Mon, 13 Apr 2009 13:27:34 +0100 References: <20090413035311.009617911@amt.cnet> <20090413035340.296329700@amt.cnet> In-Reply-To: <20090413035340.296329700@amt.cnet> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200904131327.35201.paul@codesourcery.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Marcelo Tosatti , Markus Armbruster On Monday 13 April 2009, Marcelo Tosatti wrote: > Some pci device initialization functions do not accept a devfn parameter, > but instead use "-1", which caused pci_register_device to find the first > free slot on the given bus. > > Have them accept a "devfn" parameter, and use the newly introduced > pci_bus_assign_dev_addr function on platform init code to perform > the "first free" enumeration. I don't see how this is better. If anything we want the platform code to get smaller, not larger. Paul