Skip to contentSkip to conversation

EDAC/thunderx: Fix an error message

PATCH Applied Christophe JAILLET 2 participants 2 messages May 6, 2021 – May 10, 2021

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

PATCH 1/1 EDAC/thunderx: Fix an error message

'ret' is known to be 0 here.
No error code is available, so just remove it from the error message.

Fixes 41003396f932 ("EDAC, thunderx: Add Cavium ThunderX EDAC driver")
---
 drivers/edac/thunderx_edac.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/edac/thunderx_edac.c +2 -2
index 0eb5eb97fd74..f13674081cb6 100644
@@ -1368,7 +1368,7 @@ static int thunderx_ocx_probe(struct pci_dev *pdev,
 					      name, 1, "CCPI", 1,
 					      0, NULL, 0, idx);
 	if (!edac_dev) {
-		dev_err(&pdev->dev, "Cannot allocate EDAC device: %d\n", ret);
+		dev_err(&pdev->dev, "Cannot allocate EDAC device\n");
 		return -ENOMEM;
 	}
 	ocx = edac_dev->pvt_info;
@@ -1380,7 +1380,7 @@ static int thunderx_ocx_probe(struct pci_dev *pdev,
 
 	ocx->regs = pcim_iomap_table(pdev)[0];
 	if (!ocx->regs) {
-		dev_err(&pdev->dev, "Cannot map PCI resources: %d\n", ret);
+		dev_err(&pdev->dev, "Cannot map PCI resources\n");
 		ret = -ENODEV;
 		goto err_free;
 	}
Signature · 1 line
2.30.2
maintainer Applied
#1 lore raw
Quoted 24 lines · Christophe JAILLET

'ret' is known to be 0 here.
No error code is available, so just remove it from the error message.

Fixes 41003396f932 ("EDAC, thunderx: Add Cavium ThunderX EDAC driver")
---
 drivers/edac/thunderx_edac.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/edac/thunderx_edac.c +1 -1
index 0eb5eb97fd74..f13674081cb6 100644
@@ -1368,7 +1368,7 @@ static int thunderx_ocx_probe(struct pci_dev *pdev,
 					      name, 1, "CCPI", 1,
 					      0, NULL, 0, idx);
 	if (!edac_dev) {
-		dev_err(&pdev->dev, "Cannot allocate EDAC device: %d\n", ret);
+		dev_err(&pdev->dev, "Cannot allocate EDAC device\n");
 		return -ENOMEM;
 	}
 	ocx = edac_dev->pvt_info;

drivers/edac/thunderx_edac.c static int thunderx_ocx_probe(struct pci_dev *pdev, · line 1386

Quoted 8 lines
drivers/edac/thunderx_edac.c +1 -1
@@ -1380,7 +1380,7 @@ static int thunderx_ocx_probe(struct pci_dev *pdev,
 
 	ocx->regs = pcim_iomap_table(pdev)[0];
 	if (!ocx->regs) {
-		dev_err(&pdev->dev, "Cannot map PCI resources: %d\n", ret);
+		dev_err(&pdev->dev, "Cannot map PCI resources\n");
 		ret = -ENODEV;
 		goto err_free;
 	}

Applied, thanks.

Signature · 4 lines
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette