Skip to contentSkip to conversation

PCI: dwc: Use dev_info() instead of dev_err()

PATCH In review Vidya Sagar 3 participants 3 messages Aug 23, 2019 – Aug 25, 2019

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

PATCH 1/1 PCI: dwc: Use dev_info() instead of dev_err()

When a platform has an open PCIe slot, not having a device connected to it doesn't have to result in a dev_err() print saying that the link is not up but a dev_info() would suffice.

---
 drivers/pci/controller/dwc/pcie-designware.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/controller/dwc/pcie-designware.c +1 -1
index 59eaeeb21dbe..4d6690b6ca36 100644
@@ -456,7 +456,7 @@ int dw_pcie_wait_for_link(struct dw_pcie *pci)
 		usleep_range(LINK_WAIT_USLEEP_MIN, LINK_WAIT_USLEEP_MAX);
 	}
 
-	dev_err(pci->dev, "Phy link never came up\n");
+	dev_info(pci->dev, "Phy link never came up\n");
 
 	return -ETIMEDOUT;
 }
Signature · 1 line
2.17.1
#1 lore raw
Quoted 8 lines · Vidya Sagar

When a platform has an open PCIe slot, not having a device connected to it doesn't have to result in a dev_err() print saying that the link is not up but a dev_info() would suffice.

---
 drivers/pci/controller/dwc/pcie-designware.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Squashed in pci/tegra, thanks.

Lorenzo

Quoted 16 lines
drivers/pci/controller/dwc/pcie-designware.c +1 -1
index 59eaeeb21dbe..4d6690b6ca36 100644
@@ -456,7 +456,7 @@ int dw_pcie_wait_for_link(struct dw_pcie *pci)
 		usleep_range(LINK_WAIT_USLEEP_MIN, LINK_WAIT_USLEEP_MAX);
 	}
 
-	dev_err(pci->dev, "Phy link never came up\n");
+	dev_info(pci->dev, "Phy link never came up\n");
 
 	return -ETIMEDOUT;
 }
Signature · 1 line
2.17.1
#2 lore raw
In reply to Vidya Sagar
Quoted 14 lines · Vidya Sagar

When a platform has an open PCIe slot, not having a device connected to it doesn't have to result in a dev_err() print saying that the link is not up but a dev_info() would suffice.

---
 drivers/pci/controller/dwc/pcie-designware.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/controller/dwc/pcie-designware.c +0 -0
index 59eaeeb21dbe..4d6690b6ca36 100644

drivers/pci/controller/dwc/pcie-designware.c int dw_pcie_wait_for_link(struct dw_pcie *pci) · line 459

Quoted 5 lines
drivers/pci/controller/dwc/pcie-designware.c +1 -1
@@ -456,7 +456,7 @@ int dw_pcie_wait_for_link(struct dw_pcie *pci)
 		usleep_range(LINK_WAIT_USLEEP_MIN, LINK_WAIT_USLEEP_MAX);
 	}
 
-	dev_err(pci->dev, "Phy link never came up\n");
+	dev_info(pci->dev, "Phy link never came up\n");

IMO this message is not very descriptive. Why not just say 'no device connected'? From the changelog it is clear what this means but the message itself could be clearer. Or should it even be a dev_dbg?

Cheers
Jon

Signature · 1 line
nvpublic