From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53717) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eKINr-00043W-Qb for qemu-devel@nongnu.org; Thu, 30 Nov 2017 01:31:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eKINo-0002ZP-OU for qemu-devel@nongnu.org; Thu, 30 Nov 2017 01:31:43 -0500 Received: from mx1.redhat.com ([209.132.183.28]:55692) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eKINo-0002YR-Ic for qemu-devel@nongnu.org; Thu, 30 Nov 2017 01:31:40 -0500 Date: Thu, 30 Nov 2017 14:31:31 +0800 From: Peter Xu Message-ID: <20171130063131.GD22901@xz-mi> References: <20171129084628.12336-1-david@gibson.dropbear.id.au> <20171129084628.12336-7-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20171129084628.12336-7-david@gibson.dropbear.id.au> Subject: Re: [Qemu-devel] [for-2.12 6/7] pci: Eliminate redundant PCIDevice::bus pointer List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Gibson Cc: "Michael S . Tsirkin" , Eduardo Habkost , Marcel Apfelbaum , Igor Mammedov , qemu-devel@nongnu.org On Wed, Nov 29, 2017 at 07:46:27PM +1100, David Gibson wrote: > The bus pointer in PCIDevice is basically redundant with QOM information. > It's always initialized to the qdev_get_parent_bus(), the only difference > is the type. > > Therefore this patch eliminates the field, instead creating a pci_get_bus() > helper to do the type mangling to derive it conveniently from the QOM > Device object underneath. > > Signed-off-by: David Gibson Reviewed-by: Peter Xu -- Peter Xu