qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [for-2.12 1/7] pci: Rename root bus initialization func


From: Peter Xu
Subject: Re: [Qemu-devel] [for-2.12 1/7] pci: Rename root bus initialization functions for clarity
Date: Fri, 1 Dec 2017 12:27:34 +0800
User-agent: Mutt/1.9.1 (2017-09-22)

On Fri, Dec 01, 2017 at 11:02:50AM +1100, David Gibson wrote:
> On Thu, Nov 30, 2017 at 02:17:21PM +0800, Peter Xu wrote:
> > On Wed, Nov 29, 2017 at 07:46:22PM +1100, David Gibson wrote:
> > > pci_bus_init(), pci_bus_new_inplace(), pci_bus_new() and 
> > > pci_register_bus()
> > > are misleadingly named.  They're not used for initializing *any* PCI bus,
> > > but only for a root PCI bus.
> > > 
> > > Non-root buses - i.e. ones under a logical PCI to PCI bridge - are instead
> > > created with a direct qbus_create_inplace() (see pci_bridge_initfn()).
> > > 
> > > This patch renames the functions to make it clear they're only used for
> > > a root bus.
> > > 
> > > Signed-off-by: David Gibson <address@hidden>
> > 
> > An optional nit: would it be nice to name the new functions as:
> > pci_bus_root_*()?  Say, I would prefer pci_bus_root_new() than
> > pci_root_bus_new() since root bus is still a specific type of bus.
> 
> Hrm,.  *_bus_root_* reads very strangely to me, I find it less clear
> than ..._root_bus_...

Sure.  I'm also fine to keep it the old way.  Thanks,

-- 
Peter Xu



reply via email to

[Prev in Thread] Current Thread [Next in Thread]