All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: ipa: Remove useless error message
@ 2021-03-16  9:41 Jay Fang
  2021-03-16 10:22 ` Alex Elder
  2021-03-16 22:30 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Jay Fang @ 2021-03-16  9:41 UTC (permalink / raw)
  To: elder; +Cc: netdev

From: Zihao Tang <tangzihao1@hisilicon.com>

Fix the following coccicheck report:

drivers/net/ipa/gsi.c:1341:2-9:
line 1341 is redundant because platform_get_irq() already prints an error

Remove dev_err() messages after platform_get_irq_byname() failures.

Signed-off-by: Zihao Tang <tangzihao1@hisilicon.com>
Signed-off-by: Jay Fang <f.fangjian@huawei.com>
---
 drivers/net/ipa/gsi.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ipa/gsi.c b/drivers/net/ipa/gsi.c
index 390d340..2119367 100644
--- a/drivers/net/ipa/gsi.c
+++ b/drivers/net/ipa/gsi.c
@@ -1337,10 +1337,9 @@ static int gsi_irq_init(struct gsi *gsi, struct platform_device *pdev)
 	int ret;
 
 	ret = platform_get_irq_byname(pdev, "gsi");
-	if (ret <= 0) {
-		dev_err(dev, "DT error %d getting \"gsi\" IRQ property\n", ret);
+	if (ret <= 0)
 		return ret ? : -EINVAL;
-	}
+
 	irq = ret;
 
 	ret = request_irq(irq, gsi_isr, 0, "gsi", gsi);
-- 
2.7.4


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

* Re: [PATCH] net: ipa: Remove useless error message
  2021-03-16  9:41 [PATCH] net: ipa: Remove useless error message Jay Fang
@ 2021-03-16 10:22 ` Alex Elder
  2021-03-16 22:30 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Alex Elder @ 2021-03-16 10:22 UTC (permalink / raw)
  To: Jay Fang, elder; +Cc: netdev

On 3/16/21 4:41 AM, Jay Fang wrote:
> From: Zihao Tang <tangzihao1@hisilicon.com>
> 
> Fix the following coccicheck report:
> 
> drivers/net/ipa/gsi.c:1341:2-9:
> line 1341 is redundant because platform_get_irq() already prints an error
> 
> Remove dev_err() messages after platform_get_irq_byname() failures.
> 
> Signed-off-by: Zihao Tang <tangzihao1@hisilicon.com>
> Signed-off-by: Jay Fang <f.fangjian@huawei.com>

The error message printed by platform_get_irq_byname()
does not indicate what the error (errno) is.  But in
practice we essentially won't get these errors, and
if we do the message from platform_get_irq() is
enough to know there's a problem of some kind.

Thanks for the patch.

Reviewed-by: Alex Elder <elder@linaro.org>

> ---
>   drivers/net/ipa/gsi.c | 5 ++---
>   1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/ipa/gsi.c b/drivers/net/ipa/gsi.c
> index 390d340..2119367 100644
> --- a/drivers/net/ipa/gsi.c
> +++ b/drivers/net/ipa/gsi.c
> @@ -1337,10 +1337,9 @@ static int gsi_irq_init(struct gsi *gsi, struct platform_device *pdev)
>   	int ret;
>   
>   	ret = platform_get_irq_byname(pdev, "gsi");
> -	if (ret <= 0) {
> -		dev_err(dev, "DT error %d getting \"gsi\" IRQ property\n", ret);
> +	if (ret <= 0)
>   		return ret ? : -EINVAL;
> -	}
> +
>   	irq = ret;
>   
>   	ret = request_irq(irq, gsi_isr, 0, "gsi", gsi);
> 


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

* Re: [PATCH] net: ipa: Remove useless error message
  2021-03-16  9:41 [PATCH] net: ipa: Remove useless error message Jay Fang
  2021-03-16 10:22 ` Alex Elder
@ 2021-03-16 22:30 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-03-16 22:30 UTC (permalink / raw)
  To: Jay Fang; +Cc: elder, netdev

Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

On Tue, 16 Mar 2021 17:41:06 +0800 you wrote:
> From: Zihao Tang <tangzihao1@hisilicon.com>
> 
> Fix the following coccicheck report:
> 
> drivers/net/ipa/gsi.c:1341:2-9:
> line 1341 is redundant because platform_get_irq() already prints an error
> 
> [...]

Here is the summary with links:
  - net: ipa: Remove useless error message
    https://git.kernel.org/netdev/net-next/c/91306d1d131e

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2021-03-16 22:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-16  9:41 [PATCH] net: ipa: Remove useless error message Jay Fang
2021-03-16 10:22 ` Alex Elder
2021-03-16 22:30 ` patchwork-bot+netdevbpf

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.