Skip to contentSkip to conversation

scsi: ufs: ufs-mediatek: Remove surplus dev_err()

PATCH Applied Yang Li 4 participants 5 messages Jul 12, 2023 – Jul 23, 2023

Subsystems (3)
lore
Share & tools
lore

Yang Li

author
#0 lore raw

PATCH 1/1 scsi: ufs: ufs-mediatek: Remove surplus dev_err()

There is no need to call the dev_err() function directly to print a custom message when handling an error from either the platform_get_irq() or platform_get_irq_byname() functions as both are going to display an appropriate error message in case of a failure.

./drivers/ufs/host/ufs-mediatek.c:864:3-10: line 864 is redundant because platform_get_irq() already prints an error

---
 drivers/ufs/host/ufs-mediatek.c | 1 -
 1 file changed, 1 deletion(-)
drivers/ufs/host/ufs-mediatek.c +0 -1
index 786b1469eb52..b499eade957e 100644
@@ -861,7 +861,6 @@ static void ufs_mtk_init_mcq_irq(struct ufs_hba *hba)
 		irq = platform_get_irq(pdev, i + 1);
 		if (irq < 0) {
 			host->mcq_intr_info[i].irq = MTK_MCQ_INVALID_IRQ;
-			dev_err(hba->dev, "get platform mcq irq fail: %d\n", i);
 			goto failed;
 		}
 		host->mcq_intr_info[i].hba = hba;
Signature · 1 line
2.20.1.7.g153144c
maintainer Reviewed-by on v1 1/1
#1 lore raw

Il 12/07/23 08:48, Yang Li ha scritto:

Quoted 10 lines

There is no need to call the dev_err() function directly to print a custom message when handling an error from either the platform_get_irq() or platform_get_irq_byname() functions as both are going to display an appropriate error message in case of a failure.

./drivers/ufs/host/ufs-mediatek.c:864:3-10: line 864 is redundant because platform_get_irq() already prints an error

Acked-by on v1 1/1
#2 lore raw
In reply to Yang Li
Quoted 9 lines · Yang Li

There is no need to call the dev_err() function directly to print a custom message when handling an error from either the platform_get_irq() or platform_get_irq_byname() functions as both are going to display an appropriate error message in case of a failure.

./drivers/ufs/host/ufs-mediatek.c:864:3-10: line 864 is redundant because platform_get_irq() already prints an error

Signature · 2 lines
Regards,
Sudeep
#3 lore raw
Quoted 6 lines · Sudeep Holla
Quoted 5 lines · Yang Li

There is no need to call the dev_err() function directly to print a custom message when handling an error from either the platform_get_irq() or platform_get_irq_byname() functions as both are going to display an appropriate error message in case of a failure.

Quoted 7 lines
Quoted 4 lines

./drivers/ufs/host/ufs-mediatek.c:864:3-10: line 864 is redundant because platform_get_irq() already prints an error

Sorry for this, I didn't mean to ack this patch, no idea how on earth I managed to do that (must be some wrong key combination in my email client) but I wanted and meant to ack only this [1]. Sorry for the noise.

Signature · 4 lines
Regards,
Sudeep

[1] https://lore.kernel.org/r/[email protected]
#4 lore raw
In reply to Yang Li

Yang,

Quoted 4 lines

There is no need to call the dev_err() function directly to print a custom message when handling an error from either the platform_get_irq() or platform_get_irq_byname() functions as both are going to display an appropriate error message in case of a failure.

Applied to 6.6/scsi-staging, thanks!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering