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] [day] [month] [year] [list]
Message-ID: <20210119093200.GB27433@zn.tnic>
Date:   Tue, 19 Jan 2021 10:32:00 +0100
From:   Borislav Petkov <bp@...en8.de>
To:     menglong8.dong@...il.com
Cc:     rric@...nel.org, khuong@...amperecomputing.com, mchehab@...nel.org,
        tony.luck@...el.com, james.morse@....com,
        linux-edac@...r.kernel.org, linux-kernel@...r.kernel.org,
        Menglong Dong <dong.menglong@....com.cn>
Subject: Re: [PATCH v2] edac: remove redundant error print in xgene_edac_probe

On Tue, Jan 12, 2021 at 02:35:40AM -0800, menglong8.dong@...il.com wrote:
> From: Menglong Dong <dong.menglong@....com.cn>
> 
> Coccinelle reports a redundant error print in xgene_edac_probe.
> As 'platform_get_irq' already prints the error message, error
> print here is redundant.
> 
> Fix it by using 'platform_get_irq_optional' in place of
> 'platform_get_irq', as Robert suggested.
> 
> Signed-off-by: Menglong Dong <dong.menglong@....com.cn>
> ---
> v2:
> - use 'platform_get_irq_optional' instead of 'platform_get_irq'
> ---
>  drivers/edac/xgene_edac.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/edac/xgene_edac.c b/drivers/edac/xgene_edac.c
> index 1d2c27a00a4a..2ccd1db5e98f 100644
> --- a/drivers/edac/xgene_edac.c
> +++ b/drivers/edac/xgene_edac.c
> @@ -1916,7 +1916,7 @@ static int xgene_edac_probe(struct platform_device *pdev)
>  		int i;
>  
>  		for (i = 0; i < 3; i++) {
> -			irq = platform_get_irq(pdev, i);
> +			irq = platform_get_irq_optional(pdev, i);
>  			if (irq < 0) {
>  				dev_err(&pdev->dev, "No IRQ resource\n");
>  				rc = -EINVAL;
> -- 

Applied, thanks.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ