mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] EDAC: altera: Remove unnecessary print function dev_err()
@ 2022-11-06 13:33 wangkailong
  2022-11-06 16:26 ` Joe Perches
  0 siblings, 1 reply; 2+ messages in thread
From: wangkailong @ 2022-11-06 13:33 UTC (permalink / raw)
  To: bp, mchehab, tony.luck, james.morse, rric; +Cc: linux-edac, linux-kernel

Eliminate the follow coccicheck warning:

./drivers/edac/altera_edac.c:2153:2-9: line 2153 is redundant because
platform_get_irq() already prints an error
./drivers/edac/altera_edac.c:2188:2-9: line 2188 is redundant because
platform_get_irq() already prints an error

Signed-off-by: KaiLong Wang <wangkailong@jari.cn>
---
 drivers/edac/altera_edac.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/edac/altera_edac.c b/drivers/edac/altera_edac.c
index e7e8e624a436..bd5b15ceb872 100644
--- a/drivers/edac/altera_edac.c
+++ b/drivers/edac/altera_edac.c
@@ -2150,7 +2150,6 @@ static int altr_edac_a10_probe(struct platform_device *pdev)
 
 	edac->sb_irq = platform_get_irq(pdev, 0);
 	if (edac->sb_irq < 0) {
-		dev_err(&pdev->dev, "No SBERR IRQ resource\n");
 		return edac->sb_irq;
 	}
 
@@ -2185,7 +2184,6 @@ static int altr_edac_a10_probe(struct platform_device *pdev)
 #else
 	edac->db_irq = platform_get_irq(pdev, 1);
 	if (edac->db_irq < 0) {
-		dev_err(&pdev->dev, "No DBERR IRQ resource\n");
 		return edac->db_irq;
 	}
 	irq_set_chained_handler_and_data(edac->db_irq,
-- 
2.25.1

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

* Re: [PATCH] EDAC: altera: Remove unnecessary print function dev_err()
  2022-11-06 13:33 [PATCH] EDAC: altera: Remove unnecessary print function dev_err() wangkailong
@ 2022-11-06 16:26 ` Joe Perches
  0 siblings, 0 replies; 2+ messages in thread
From: Joe Perches @ 2022-11-06 16:26 UTC (permalink / raw)
  To: wangkailong, bp, mchehab, tony.luck, james.morse, rric
  Cc: linux-edac, linux-kernel

On Sun, 2022-11-06 at 21:33 +0800, wangkailong@jari.cn wrote:
> Eliminate the follow coccicheck warning:
> 
> ./drivers/edac/altera_edac.c:2153:2-9: line 2153 is redundant because
> platform_get_irq() already prints an error
> ./drivers/edac/altera_edac.c:2188:2-9: line 2188 is redundant because
> platform_get_irq() already prints an error
[]
> diff --git a/drivers/edac/altera_edac.c b/drivers/edac/altera_edac.c
[]
> @@ -2150,7 +2150,6 @@ static int altr_edac_a10_probe(struct platform_device *pdev)
>  
>  	edac->sb_irq = platform_get_irq(pdev, 0);
>  	if (edac->sb_irq < 0) {
> -		dev_err(&pdev->dev, "No SBERR IRQ resource\n");
>  		return edac->sb_irq;
>  	}

Should delete now unnecessary braces too

>  
> @@ -2185,7 +2184,6 @@ static int altr_edac_a10_probe(struct platform_device *pdev)
>  #else
>  	edac->db_irq = platform_get_irq(pdev, 1);
>  	if (edac->db_irq < 0) {
> -		dev_err(&pdev->dev, "No DBERR IRQ resource\n");
>  		return edac->db_irq;
>  	}
>  	irq_set_chained_handler_and_data(edac->db_irq,


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

end of thread, other threads:[~2022-11-06 16:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-06 13:33 [PATCH] EDAC: altera: Remove unnecessary print function dev_err() wangkailong
2022-11-06 16:26 ` Joe Perches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®