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: <20211209175409.7260f5f9@xps13>
Date:   Thu, 9 Dec 2021 17:54:09 +0100
From:   Miquel Raynal <miquel.raynal@...tlin.com>
To:     Yihao Han <hanyihao@...o.com>
Cc:     Richard Weinberger <richard@....at>,
        Vignesh Raghavendra <vigneshr@...com>,
        linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org,
        kernel@...o.com
Subject: Re: [PATCH] mtd: nand: fix boolreturn.cocci warning

Hi Yihao,

hanyihao@...o.com wrote on Mon,  6 Dec 2021 04:15:30 -0800:

> ./drivers/mtd/nand/core.c:25:9-10: WARNING: return of 0/1 in
> function 'nanddev_isbad' with return type bool
> 
> Return statements in functions returning bool should use true/false
> instead of 1/0.

This is -next material, I want to have a clean branch there so I
applied this change inline, I hope you don't mind.

> 
> Signed-off-by: Yihao Han <hanyihao@...o.com>
> ---
>  drivers/mtd/nand/core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/nand/core.c b/drivers/mtd/nand/core.c
> index 33c7788d76c2..416947f28b67 100644
> --- a/drivers/mtd/nand/core.c
> +++ b/drivers/mtd/nand/core.c
> @@ -22,7 +22,7 @@
>  bool nanddev_isbad(struct nand_device *nand, const struct nand_pos *pos)
>  {
>  	if (WARN_ONCE(mtd_expert_analysis_mode, mtd_expert_analysis_warning))
> -		return 0;
> +		return false;
>  
>  	if (nanddev_bbt_is_initialized(nand)) {
>  		unsigned int entry;


Thanks,
Miquèl

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ