Skip to contentSkip to conversation

PCI: cadence: Fix static checker warning

PATCH In review Kishon Vijay Abraham I 2 participants 2 messages Jul 27, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PCI: cadence: Fix static checker warning

Fix the following static checker warning

drivers/pci/controller/cadence/pcie-cadence-host.c:322 cdns_pcie_host_map_dma_ranges()
warn: ignoring unreachable code.

Fixes 82d8567259b1 ("PCI: cadence: Use "dma-ranges" instead of "cdns,no-bar-match-nbits" property")

---
Hi Lorenzo,

If possible can you squash this patch to "PCI: cadence: Use "dma-ranges" instead of "cdns,no-bar-match-nbits" property".

Thanks
Kishon

 drivers/pci/controller/cadence/pcie-cadence-host.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/pci/controller/cadence/pcie-cadence-host.c +3 -2
index ba157278fb0f..8d86560196aa 100644
@@ -321,9 +321,10 @@ static int cdns_pcie_host_map_dma_ranges(struct cdns_pcie_rc *rc)
 
 	resource_list_for_each_entry(entry, &bridge->dma_ranges) {
 		err = cdns_pcie_host_bar_config(rc, entry);
-		if (err)
+		if (err) {
 			dev_err(dev, "Fail to configure IB using dma-ranges\n");
-		return err;
+			return err;
+		}
 	}
 
 	return 0;
Signature · 1 line
2.17.1
#1 lore raw
Quoted 5 lines · Kishon Vijay Abraham I

Fix the following static checker warning

drivers/pci/controller/cadence/pcie-cadence-host.c:322 cdns_pcie_host_map_dma_ranges()
warn: ignoring unreachable code.

Quoted 8 lines
Fixes 82d8567259b1 ("PCI: cadence: Use "dma-ranges" instead of "cdns,no-bar-match-nbits" property")

---
Hi Lorenzo,

If possible can you squash this patch to "PCI: cadence: Use "dma-ranges" instead of "cdns,no-bar-match-nbits" property".

Done, thanks !

Lorenzo