From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Subject: Re: [PATCH 11/28] PCI: Introduce pci_host_bridge_ops to setup host bridge Date: Fri, 16 Jan 2015 10:35:30 +0100 Message-ID: <3832604.lYie7PXiOd@wuerfel> References: <1421372666-12288-1-git-send-email-wangyijing@huawei.com> <1421372666-12288-12-git-send-email-wangyijing@huawei.com> <1443278.UW4hQ0rXtr@wuerfel> Mime-Version: 1.0 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: <1443278.UW4hQ0rXtr@wuerfel> Sender: linux-kernel-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="iso-8859-1" To: Yijing Wang Cc: Bjorn Helgaas , Jiang Liu , linux-pci@vger.kernel.org, Yinghai Lu , linux-kernel@vger.kernel.org, Marc Zyngier , linux-arm-kernel@lists.infradead.org, Russell King , x86@kernel.org, Thomas Gleixner , Tony Luck , linux-ia64@vger.kernel.org, "David S. Miller" , Guan Xuetao , linux-alpha@vger.kernel.org, linux-m68k@lists.linux-m68k.org, Liviu Dudau , Geert Uytterhoeven On Friday 16 January 2015 10:23:11 Arnd Bergmann wrote: > On Friday 16 January 2015 09:44:09 Yijing Wang wrote: > > @@ -2064,7 +2073,7 @@ struct pci_bus *pci_scan_root_bus(struct devi= ce *parent, u32 db, > > { > > struct pci_host_bridge *host; > > =20 > > - host =3D pci_create_host_bridge(parent, db, resources, sysd= ata); > > + host =3D pci_create_host_bridge(parent, db, resources, sysd= ata, NULL); > > if (!host) > > return NULL; > > =20 > >=20 >=20 > Same comment as for patch 10: If we leave this out of the pci_create_= host_bridge > argument but set it later, =FEe interface becomes simpler for callers= that > don't have custom pci_host_bridge_ops. >=20 > This would break your phb_prepare() callback, but I assume a host dri= ver > can just make a direct function call before entering pci_create_host_= bridge > for this. Let me know if I'm missing something here. I've read the later patches now that explain why it's needed, so neverm= ind my comment above. Arnd