From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Yihao Han <hanyihao@vivo.com>
Cc: Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
kernel@vivo.com
Subject: Re: [PATCH] mtd: nand: fix boolreturn.cocci warning
Date: Thu, 9 Dec 2021 17:54:09 +0100 [thread overview]
Message-ID: <20211209175409.7260f5f9@xps13> (raw)
In-Reply-To: <20211206121531.31808-1-hanyihao@vivo.com>
Hi Yihao,
hanyihao@vivo.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@vivo.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
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
prev parent reply other threads:[~2021-12-09 16:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-06 12:15 [PATCH] mtd: nand: fix boolreturn.cocci warning Yihao Han
2021-12-09 16:54 ` Miquel Raynal [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211209175409.7260f5f9@xps13 \
--to=miquel.raynal@bootlin.com \
--cc=hanyihao@vivo.com \
--cc=kernel@vivo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=richard@nod.at \
--cc=vigneshr@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox