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: <20221006094729.61ff9b24@xps-13>
Date:   Thu, 6 Oct 2022 09:47:29 +0200
From:   Miquel Raynal <miquel.raynal@...tlin.com>
To:     Christophe Leroy <christophe.leroy@...roup.eu>
Cc:     Richard Weinberger <richard@....at>,
        Vignesh Raghavendra <vigneshr@...com>,
        linux-kernel@...r.kernel.org, linux-mtd@...ts.infradead.org
Subject: Re: [PATCH] mtd: rawnand: mpc5121: Replace NO_IRQ by 0

Hi Christophe,

christophe.leroy@...roup.eu wrote on Thu,  6 Oct 2022 07:29:12 +0200:

> NO_IRQ is used to check the return of irq_of_parse_and_map().
> 
> On some architecture NO_IRQ is 0, on other architectures it is -1.
> 
> irq_of_parse_and_map() returns 0 on error, independent of NO_IRQ.
> 
> So use 0 instead of using NO_IRQ.
> 
> Signed-off-by: Christophe Leroy <christophe.leroy@...roup.eu>

Deserves Fixes and Cc:stable tags, isn't it?

> ---
>  drivers/mtd/nand/raw/mpc5121_nfc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/nand/raw/mpc5121_nfc.c b/drivers/mtd/nand/raw/mpc5121_nfc.c
> index 800d774aed8e..f68349cb7824 100644
> --- a/drivers/mtd/nand/raw/mpc5121_nfc.c
> +++ b/drivers/mtd/nand/raw/mpc5121_nfc.c
> @@ -663,7 +663,7 @@ static int mpc5121_nfc_probe(struct platform_device *op)
>  	}
>  
>  	prv->irq = irq_of_parse_and_map(dn, 0);
> -	if (prv->irq == NO_IRQ) {
> +	if (!prv->irq) {
>  		dev_err(dev, "Error mapping IRQ!\n");
>  		return -EINVAL;
>  	}


Thanks,
Miquèl

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ