Message ID | 20210701204401.1636562-1-kw@linux.com (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Lorenzo Pieralisi |
Headers | show |
Series | [v2,1/2] PCI: artpec6: Remove surplus break statement after return | expand |
On Thu, Jul 01, 2021 at 10:44:00PM +0200, Krzysztof Wilczyński wrote: > As part of code refactoring completed in the commit a0fd361db8e5 ("PCI: > dwc: Move "dbi", "dbi2", and "addr_space" resource setup into common > code") the function artpec6_add_pcie_ep() has been removed and the call > to the dw_pcie_ep_init() has been moved into artpec6_pcie_probe(). > > This change left a break statement behind that is not needed any more as > as the function artpec6_pcie_probe() return immediately after making > a call to dw_pcie_ep_init(). > > Thus remove this surplus break statement that became a dead code. > > Signed-off-by: Krzysztof Wilczyński <kw@linux.com> Acked-by: Jesper Nilsson <jesper.nilsson@axis.com> /^JN - Jesper Nilsson
On Thu, 1 Jul 2021 20:44:00 +0000, Krzysztof Wilczyński wrote: > As part of code refactoring completed in the commit a0fd361db8e5 ("PCI: > dwc: Move "dbi", "dbi2", and "addr_space" resource setup into common > code") the function artpec6_add_pcie_ep() has been removed and the call > to the dw_pcie_ep_init() has been moved into artpec6_pcie_probe(). > > This change left a break statement behind that is not needed any more as > as the function artpec6_pcie_probe() return immediately after making > a call to dw_pcie_ep_init(). > > [...] Applied to pci/dwc, thanks! [1/2] PCI: artpec6: Remove surplus break statement after return https://git.kernel.org/lpieralisi/pci/c/7c665ce919 [2/2] PCI: artpec6: Remove local code block from within switch statement https://git.kernel.org/lpieralisi/pci/c/313b1c763c Thanks, Lorenzo
diff --git a/drivers/pci/controller/dwc/pcie-artpec6.c b/drivers/pci/controller/dwc/pcie-artpec6.c index 597c282f586c..739871bece75 100644 --- a/drivers/pci/controller/dwc/pcie-artpec6.c +++ b/drivers/pci/controller/dwc/pcie-artpec6.c @@ -445,7 +445,6 @@ static int artpec6_pcie_probe(struct platform_device *pdev) pci->ep.ops = &pcie_ep_ops; return dw_pcie_ep_init(&pci->ep); - break; } default: dev_err(dev, "INVALID device type %d\n", artpec6_pcie->mode);
As part of code refactoring completed in the commit a0fd361db8e5 ("PCI: dwc: Move "dbi", "dbi2", and "addr_space" resource setup into common code") the function artpec6_add_pcie_ep() has been removed and the call to the dw_pcie_ep_init() has been moved into artpec6_pcie_probe(). This change left a break statement behind that is not needed any more as as the function artpec6_pcie_probe() return immediately after making a call to dw_pcie_ep_init(). Thus remove this surplus break statement that became a dead code. Signed-off-by: Krzysztof Wilczyński <kw@linux.com> --- drivers/pci/controller/dwc/pcie-artpec6.c | 1 - 1 file changed, 1 deletion(-)