[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211206121531.31808-1-hanyihao@vivo.com>
Date: Mon, 6 Dec 2021 04:15:30 -0800
From: Yihao Han <hanyihao@...o.com>
To: Miquel Raynal <miquel.raynal@...tlin.com>,
Richard Weinberger <richard@....at>,
Vignesh Raghavendra <vigneshr@...com>,
linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org
Cc: kernel@...o.com, Yihao Han <hanyihao@...o.com>
Subject: [PATCH] mtd: nand: fix boolreturn.cocci warning
./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.
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;
--
2.17.1
Powered by blists - more mailing lists