* [PATCH] PCI: dwc: Remove surplus break statement after return
@ 2021-07-01 21:02 Krzysztof Wilczyński
2021-07-23 15:17 ` Lorenzo Pieralisi
0 siblings, 1 reply; 2+ messages in thread
From: Krzysztof Wilczyński @ 2021-07-01 21:02 UTC (permalink / raw)
To: Jingoo Han
Cc: Gustavo Pimentel, Bjorn Helgaas, Lorenzo Pieralisi, Rob Herring,
linux-pci
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 dw_plat_add_pcie_ep() has been removed and the call
to the dw_pcie_ep_init() has been moved into dw_plat_pcie_probe().
This change left a break statement behind that is not needed any more as
as the function dw_plat_pcie_probe() returns immediately after making
a call to dw_pcie_ep_init().
Thus remove this surplus break statement that became a dead code.
Suggested-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Krzysztof Wilczyński <kw@linux.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 9b397c807261..8851eb161a0e 100644
--- a/drivers/pci/controller/dwc/pcie-designware-plat.c
+++ b/drivers/pci/controller/dwc/pcie-designware-plat.c
@@ -164,7 +164,6 @@ static int dw_plat_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", dw_plat_pcie->mode);
}
--
2.32.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] PCI: dwc: Remove surplus break statement after return
2021-07-01 21:02 [PATCH] PCI: dwc: Remove surplus break statement after return Krzysztof Wilczyński
@ 2021-07-23 15:17 ` Lorenzo Pieralisi
0 siblings, 0 replies; 2+ messages in thread
From: Lorenzo Pieralisi @ 2021-07-23 15:17 UTC (permalink / raw)
To: Jingoo Han, Krzysztof Wilczyński
Cc: Lorenzo Pieralisi, linux-pci, Rob Herring, Gustavo Pimentel,
Bjorn Helgaas
On Thu, 1 Jul 2021 21:02:52 +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 dw_plat_add_pcie_ep() has been removed and the call
> to the dw_pcie_ep_init() has been moved into dw_plat_pcie_probe().
>
> This change left a break statement behind that is not needed any more as
> as the function dw_plat_pcie_probe() returns immediately after making
> a call to dw_pcie_ep_init().
>
> [...]
Applied to pci/dwc, thanks!
[1/1] PCI: dwc: Remove surplus break statement after return
https://git.kernel.org/lpieralisi/pci/c/2999568def
Thanks,
Lorenzo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-07-23 15:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-01 21:02 [PATCH] PCI: dwc: Remove surplus break statement after return Krzysztof Wilczyński
2021-07-23 15:17 ` Lorenzo Pieralisi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.