lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d83c4f03-245f-8230-3f67-c1cb96c8bcd2@ieee.org>
Date:   Tue, 16 Mar 2021 05:22:54 -0500
From:   Alex Elder <elder@...e.org>
To:     Jay Fang <f.fangjian@...wei.com>, elder@...nel.org
Cc:     netdev@...r.kernel.org
Subject: Re: [PATCH] net: ipa: Remove useless error message

On 3/16/21 4:41 AM, Jay Fang wrote:
> From: Zihao Tang <tangzihao1@...ilicon.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@...ilicon.com>
> Signed-off-by: Jay Fang <f.fangjian@...wei.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@...aro.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);
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ