Skip to contentSkip to conversation

dmaengine: idma64: print error message on platform_get_irq failure

PATCH Superseded Gustavo A. R. Silva 2 participants 2 messages Jun 30, 2017

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dmaengine: idma64: print error message on platform_get_irq failure

Print error message on platform_get_irq failure before return.

---
 drivers/dma/idma64.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/dma/idma64.c +3 -1
index 1953e57..08ade66 100644
@@ -637,8 +637,10 @@ static int idma64_platform_probe(struct platform_device *pdev)
 		return -ENOMEM;
 
 	chip->irq = platform_get_irq(pdev, 0);
-	if (chip->irq < 0)
+	if (chip->irq < 0) {
+		dev_err(dev, "failed to get IRQ: %d\n", chip->irq);
 		return chip->irq;
+	}
 
 	mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	chip->regs = devm_ioremap_resource(dev, mem);
Signature · 1 line
2.5.0
#1 lore raw

Hello Gustavo,

Quoted 14 lines · Gustavo A. R. Silva

Print error message on platform_get_irq failure before return.

---
 drivers/dma/idma64.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/dma/idma64.c +0 -0
index 1953e57..08ade66 100644
@@ -637,8 +637,10 @@ static int idma64_platform_probe(struct platform_device *pdev)
 		return -ENOMEM;

drivers/dma/idma64.c static int idma64_platform_probe(struct platform_device *pdev) · line 646

Quoted 10 lines
drivers/dma/idma64.c +3 -1
 
 	chip->irq = platform_get_irq(pdev, 0);
-	if (chip->irq < 0)
+	if (chip->irq < 0) {
+		dev_err(dev, "failed to get IRQ: %d\n", chip->irq);
 		return chip->irq;
+	}
 
 	mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	chip->regs = devm_ioremap_resource(dev, mem);

you do it wrong, please *immedately* stop sending this kind of patches and revoke all the ones which you have sent so far, one revoke message for each sent patch is expected.

1) there must be no error level message printed out, if the returned by platform_get_irq() value is -EPROBE_DEFER, this notice makes all your patches *invalid*,

2) if you wish it, add the error message directly into platform_get_irq(), then *remove* any similar error messages from the individual drivers.

--
With best wishes,
Vladimir