mailbox: platform-mhu: Remove unnecessary print function dev_err()
PATCH 1/1 mailbox: platform-mhu: Remove unnecessary print function dev_err()
Eliminate the follow coccicheck warning:
./drivers/mailbox/platform_mhu.c:139:3-10: line 139 is redundant because platform_get_irq() already prints an error
Signed-off-by KaiLong Wang <[email protected]>
--- drivers/mailbox/platform_mhu.c | 1 - 1 file changed, 1 deletion(-)
drivers/mailbox/platform_mhu.c +0 -1
@@ -136,7 +136,6 @@ static int platform_mhu_probe(struct platform_device *pdev) mhu->chan[i].con_priv = &mhu->mlink[i]; mhu->mlink[i].irq =platform_get_irq (pdev, i);if (mhu->mlink[i].irq <0 ) { -dev_err (dev,"failed to get irq%d\n" , i);return mhu->mlink[i].irq; } mhu->mlink[i].rx_reg = mhu->base + platform_mhu_reg[i];
Signature · 1 line
2.25.1
Le 06/11/2022 à 15:25, [email protected] a écrit :
Quoted 15 lines
Eliminate the follow coccicheck warning:
./drivers/mailbox/platform_mhu.c:139:3-10: line 139 is redundant because
platform_get_irq()already prints an errorSigned-off-by KaiLong Wang <[email protected]>--- drivers/mailbox/platform_mhu.c | 1 - 1 file changed, 1 deletion(-)drivers/mailbox/platform_mhu.c +0
-0
drivers/mailbox/platform_mhu.c static int platform_mhu_probe(struct platform_device *pdev) · line 140
Quoted 6 lines
drivers/mailbox/platform_mhu.c +0
-1@@ -136,7 +136,6 @@ static int platform_mhu_probe(struct platform_device *pdev) mhu->chan[i].con_priv = &mhu->mlink[i]; mhu->mlink[i].irq =platform_get_irq (pdev, i);if (mhu->mlink[i].irq <0 ) { -dev_err (dev,"failed to get irq%d\n" , i);return mhu->mlink[i].irq; }
Hi,
apparently, you sent several patches like this one.
When doing such cleanups, you should also remove the now useless { } when there is just one statement left, after the "if".
CJ
Quoted 1 line
drivers/mailbox/platform_mhu.c +0
-0mhu->mlink[i].rx_reg = mhu->base + platform_mhu_reg[i];