All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH linux-next] dmaengine: sf-pdma:Remove the print function dev_err()
@ 2022-08-10  6:25 cgel.zte
  2022-09-05  6:20 ` Vinod Koul
  0 siblings, 1 reply; 2+ messages in thread
From: cgel.zte @ 2022-08-10  6:25 UTC (permalink / raw)
  To: vkoul; +Cc: green.wan, dmaengine, ye xingchen, Zeal Robot

From: ye xingchen <ye.xingchen@zte.com.cn>

From the coccinelle check:

./drivers/dma/sf-pdma/sf-pdma.c
Error:line 409 is redundant because platform_get_irq() already prints an
error

./drivers/dma/sf-pdma/sf-pdma.c
Error:line 424 is redundant because platform_get_irq() already prints an
error

So,remove the unnecessary print function dev_err()

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
---
 drivers/dma/sf-pdma/sf-pdma.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/dma/sf-pdma/sf-pdma.c b/drivers/dma/sf-pdma/sf-pdma.c
index 4f8b8498c5c6..6b524eb6bcf3 100644
--- a/drivers/dma/sf-pdma/sf-pdma.c
+++ b/drivers/dma/sf-pdma/sf-pdma.c
@@ -405,10 +405,8 @@ static int sf_pdma_irq_init(struct platform_device *pdev, struct sf_pdma *pdma)
 		chan = &pdma->chans[i];
 
 		irq = platform_get_irq(pdev, i * 2);
-		if (irq < 0) {
-			dev_err(&pdev->dev, "ch(%d) Can't get done irq.\n", i);
+		if (irq < 0)
 			return -EINVAL;
-		}
 
 		r = devm_request_irq(&pdev->dev, irq, sf_pdma_done_isr, 0,
 				     dev_name(&pdev->dev), (void *)chan);
@@ -420,10 +418,8 @@ static int sf_pdma_irq_init(struct platform_device *pdev, struct sf_pdma *pdma)
 		chan->txirq = irq;
 
 		irq = platform_get_irq(pdev, (i * 2) + 1);
-		if (irq < 0) {
-			dev_err(&pdev->dev, "ch(%d) Can't get err irq.\n", i);
+		if (irq < 0)
 			return -EINVAL;
-		}
 
 		r = devm_request_irq(&pdev->dev, irq, sf_pdma_err_isr, 0,
 				     dev_name(&pdev->dev), (void *)chan);
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH linux-next] dmaengine: sf-pdma:Remove the print function dev_err()
  2022-08-10  6:25 [PATCH linux-next] dmaengine: sf-pdma:Remove the print function dev_err() cgel.zte
@ 2022-09-05  6:20 ` Vinod Koul
  0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2022-09-05  6:20 UTC (permalink / raw)
  To: cgel.zte; +Cc: green.wan, dmaengine, ye xingchen, Zeal Robot

On 10-08-22, 06:25, cgel.zte@gmail.com wrote:
> From: ye xingchen <ye.xingchen@zte.com.cn>
> 
> >From the coccinelle check:
> 
> ./drivers/dma/sf-pdma/sf-pdma.c
> Error:line 409 is redundant because platform_get_irq() already prints an
> error
> 
> ./drivers/dma/sf-pdma/sf-pdma.c
> Error:line 424 is redundant because platform_get_irq() already prints an
> error
> 
> So,remove the unnecessary print function dev_err()

Applied, thanks

-- 
~Vinod

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-09-05  6:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-10  6:25 [PATCH linux-next] dmaengine: sf-pdma:Remove the print function dev_err() cgel.zte
2022-09-05  6:20 ` Vinod Koul

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.