Skip to contentSkip to conversation

staging: gpib: Remove unnecessary print function dev_err()

PATCH In review Jiapeng Chong 2 participants 3 messages Feb 26, 2025 – Mar 20, 2025 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 staging: gpib: Remove unnecessary print function dev_err()

The print function dev_err() is redundant because platform_get_irq() already prints an error.

./drivers/staging/gpib/eastwood/fluke_gpib.c:1027:2-9: line 1027 is redundant because platform_get_irq() already prints an error.

---
 drivers/staging/gpib/eastwood/fluke_gpib.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/staging/gpib/eastwood/fluke_gpib.c +2 -3
index 731732bd8301..4fd3a6cad0d2 100644
@@ -1023,10 +1023,9 @@ static int fluke_attach_impl(gpib_board_t *board, const gpib_board_config_t *con
 	}
 
 	irq = platform_get_irq(fluke_gpib_pdev, 0);
-	if (irq < 0) {
-		dev_err(&fluke_gpib_pdev->dev, "failed to obtain IRQ\n");
+	if (irq < 0)
 		return -EBUSY;
-	}
+
 	retval = request_irq(irq, fluke_gpib_interrupt, isr_flags, fluke_gpib_pdev->name, board);
 	if (retval) {
 		dev_err(&fluke_gpib_pdev->dev,
Signature · 1 line
2.32.0.3.g01195cf9f
#1 lore raw

PATCH 2/2 staging: gpib: Remove unnecessary print function dev_err()

The print function dev_err() is redundant because platform_get_irq() already prints an error.

./drivers/staging/gpib/fmh_gpib/fmh_gpib.c:1426:2-9: line 1426 is redundant because platform_get_irq() already prints an error.

---
 drivers/staging/gpib/fmh_gpib/fmh_gpib.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/staging/gpib/fmh_gpib/fmh_gpib.c +2 -3
index d62c83368518..613bdcac12d1 100644
@@ -1422,10 +1422,9 @@ static int fmh_gpib_attach_impl(gpib_board_t *board, const gpib_board_config_t *
 		(unsigned long)resource_size(e_priv->dma_port_res));
 
 	irq = platform_get_irq(pdev, 0);
-	if (irq < 0) {
-		dev_err(board->dev, "request for IRQ failed\n");
+	if (irq < 0)
 		return -EBUSY;
-	}
+
 	retval = request_irq(irq, fmh_gpib_interrupt, IRQF_SHARED, pdev->name, board);
 	if (retval) {
 		dev_err(board->dev,
Signature · 1 line
2.32.0.3.g01195cf9f
maintainer
#2 lore raw
Quoted 11 lines · Jiapeng Chong

The print function dev_err() is redundant because platform_get_irq() already prints an error.

./drivers/staging/gpib/fmh_gpib/fmh_gpib.c:1426:2-9: line 1426 is redundant because platform_get_irq() already prints an error.

---
 drivers/staging/gpib/fmh_gpib/fmh_gpib.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

You have 2 different patches here, yet the identical subject line. I just caught this after I added it to my staging-testing branch, so I'll go drop it from there now and wait for a v2 series.

thanks,

greg k-h