[v3,6/9] PCI: designware-plat: Drop unnecessary root_bus_nr setting

Message ID 1530417291-30495-7-git-send-email-shawn.guo@linaro.org
State Accepted
Delegated to: Lorenzo Pieralisi
Headers show
Series
  • PCI: dwc: Drop unnecessary root_bus_nr setting
Related show

Commit Message

Shawn Guo July 1, 2018, 3:54 a.m.
Function dw_pcie_host_init() already initializes the root_bus_nr field
of 'struct pcie_port', so the -1 assignment prior to calling
dw_pcie_host_init() in platform specific driver is not really needed.
Drop it.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Cc: Joao Pinto <Joao.Pinto@synopsys.com>
---
 drivers/pci/controller/dwc/pcie-designware-plat.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Gustavo Pimentel July 2, 2018, 8:38 a.m. | #1
Hi Shawn,

On 01/07/2018 04:54, Shawn Guo wrote:
> Function dw_pcie_host_init() already initializes the root_bus_nr field
> of 'struct pcie_port', so the -1 assignment prior to calling
> dw_pcie_host_init() in platform specific driver is not really needed.
> Drop it.
> 
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> Cc: Joao Pinto <Joao.Pinto@synopsys.com>
> ---
>  drivers/pci/controller/dwc/pcie-designware-plat.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/pci/controller/dwc/pcie-designware-plat.c b/drivers/pci/controller/dwc/pcie-designware-plat.c
> index 5937fed4c938..6e048c0b67f2 100644
> --- a/drivers/pci/controller/dwc/pcie-designware-plat.c
> +++ b/drivers/pci/controller/dwc/pcie-designware-plat.c
> @@ -118,7 +118,6 @@ static int dw_plat_add_pcie_port(struct dw_plat_pcie *dw_plat_pcie,
>  			return pp->msi_irq;
>  	}
>  
> -	pp->root_bus_nr = -1;
>  	pp->ops = &dw_plat_pcie_host_ops;
>  
>  	ret = dw_pcie_host_init(pp);
> 

Looks good :)
Thanks

Acked-by: Gustavo Pimentel <gustavo.pimentel@synopsys.com>

Regards,
Gustavo

Patch

diff --git a/drivers/pci/controller/dwc/pcie-designware-plat.c b/drivers/pci/controller/dwc/pcie-designware-plat.c
index 5937fed4c938..6e048c0b67f2 100644
--- a/drivers/pci/controller/dwc/pcie-designware-plat.c
+++ b/drivers/pci/controller/dwc/pcie-designware-plat.c
@@ -118,7 +118,6 @@  static int dw_plat_add_pcie_port(struct dw_plat_pcie *dw_plat_pcie,
 			return pp->msi_irq;
 	}
 
-	pp->root_bus_nr = -1;
 	pp->ops = &dw_plat_pcie_host_ops;
 
 	ret = dw_pcie_host_init(pp);