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: <f04435d8-9af3-1fde-c2bf-fadd045b10a1@gmail.com>
Date:   Sun, 11 Dec 2022 17:34:15 +0100
From:   Heiner Kallweit <hkallweit1@...il.com>
To:     Kang Minchul <tegongkang@...il.com>, Alex Elder <elder@...nel.org>,
        "David S . Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>
Cc:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: ipa: Remove redundant dev_err()

On 11.12.2022 15:47, Kang Minchul wrote:
> Function dev_err() is redundant because platform_get_irq_byname()
> already prints an error.
> 
> Signed-off-by: Kang Minchul <tegongkang@...il.com>
> ---
>  drivers/net/ipa/gsi.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/net/ipa/gsi.c b/drivers/net/ipa/gsi.c
> index 55226b264e3c..585cfd3f9ec0 100644
> --- a/drivers/net/ipa/gsi.c
> +++ b/drivers/net/ipa/gsi.c
> @@ -1967,11 +1967,8 @@ int gsi_init(struct gsi *gsi, struct platform_device *pdev, bool prefetch,
>  
>  	/* Get the GSI IRQ and request for it to wake the system */
>  	ret = platform_get_irq_byname(pdev, "gsi");
> -	if (ret <= 0) {
> -		dev_err(gsi->dev,
> -			"DT error %d getting \"gsi\" IRQ property\n", ret);
> +	if (ret <= 0)

According to the function description it can't return 0.
You can further simplify the code.
And you patch should be annotated net-next.

>  		return ret ? : -EINVAL;
> -	}
>  	irq = ret;
>  
>  	ret = request_irq(irq, gsi_isr, 0, "gsi", gsi);

Powered by blists - more mailing lists