Message ID | 1525844386-5433-4-git-send-email-shawn.guo@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Delegated to: | Bjorn Helgaas |
Headers | show |
Hello Shawn, On Wed, 9 May 2018 13:39:41 +0800, Shawn Guo wrote: > The root_bus_nr initialization has already been done in function > dw_pcie_host_init(). The formulation "has already been done" makes me think it's been done *before* pp->root_bus_nr = -1, which is not what happens. I believe a better formulation here would be: dw_pcie_host_init() already initializes the root_bus_nr field of 'struct pcie_port', so there is no need to initialize it prior to calling dw_pcie_host_init(). > The -1 assignment in platform driver before > calling into dw_pcie_host_init() is not really needed. Drop it. > > Signed-off-by: Shawn Guo <shawn.guo@linaro.org> > Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Other than my comment on the commit log: Acked-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Thanks! Thomas
On Wed, May 09, 2018 at 09:29:25AM +0200, Thomas Petazzoni wrote: > Hello Shawn, > > On Wed, 9 May 2018 13:39:41 +0800, Shawn Guo wrote: > > The root_bus_nr initialization has already been done in function > > dw_pcie_host_init(). > > The formulation "has already been done" makes me think it's been done > *before* pp->root_bus_nr = -1, which is not what happens. I believe a > better formulation here would be: > > dw_pcie_host_init() already initializes the root_bus_nr field of > 'struct pcie_port', so there is no need to initialize it prior to > calling dw_pcie_host_init(). Yes, this is better. I will improve the commit log as suggested. Thanks. > > > The -1 assignment in platform driver before > > calling into dw_pcie_host_init() is not really needed. Drop it. > > > > Signed-off-by: Shawn Guo <shawn.guo@linaro.org> > > Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> > > Other than my comment on the commit log: > > Acked-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Thanks. Shawn
diff --git a/drivers/pci/dwc/pcie-armada8k.c b/drivers/pci/dwc/pcie-armada8k.c index b587352f8b9f..2d8eb88fd4f8 100644 --- a/drivers/pci/dwc/pcie-armada8k.c +++ b/drivers/pci/dwc/pcie-armada8k.c @@ -171,7 +171,6 @@ static int armada8k_add_pcie_port(struct armada8k_pcie *pcie, struct device *dev = &pdev->dev; int ret; - pp->root_bus_nr = -1; pp->ops = &armada8k_pcie_host_ops; pp->irq = platform_get_irq(pdev, 0);
The root_bus_nr initialization has already been done in function dw_pcie_host_init(). The -1 assignment in platform driver before calling into dw_pcie_host_init() is not really needed. Drop it. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> --- drivers/pci/dwc/pcie-armada8k.c | 1 - 1 file changed, 1 deletion(-)