diff mbox series

[1/1] mtd: rawnand: qcom: Delete an unneeded bool conversion

Message ID 20210510114944.3527-1-thunder.leizhen@huawei.com
State New
Headers show
Series [1/1] mtd: rawnand: qcom: Delete an unneeded bool conversion | expand

Commit Message

Leizhen (ThunderTown) May 10, 2021, 11:49 a.m. UTC
The result of an expression consisting of a single relational operator is
already of the bool type and does not need to be evaluated explicitly.

No functional change.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>

---
 drivers/mtd/nand/raw/qcom_nandc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

-- 
2.26.0.106.g9fadedd



______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

Comments

Miquel Raynal May 26, 2021, 9:03 a.m. UTC | #1
On Mon, 2021-05-10 at 11:49:44 UTC, Zhen Lei wrote:
> The result of an expression consisting of a single relational operator is

> already of the bool type and does not need to be evaluated explicitly.

> 

> No functional change.

> 

> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>


Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.

Miquel

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
diff mbox series

Patch

diff --git a/drivers/mtd/nand/raw/qcom_nandc.c b/drivers/mtd/nand/raw/qcom_nandc.c
index a64fb6ce915daee..22e6ca521185dca 100644
--- a/drivers/mtd/nand/raw/qcom_nandc.c
+++ b/drivers/mtd/nand/raw/qcom_nandc.c
@@ -1850,8 +1850,7 @@  static int parse_read_errors(struct qcom_nand_host *host, u8 *data_buf,
 			 * ERASED_CW bits are set.
 			 */
 			if (host->bch_enabled) {
-				erased = (erased_cw & ERASED_CW) == ERASED_CW ?
-					 true : false;
+				erased = (erased_cw & ERASED_CW) == ERASED_CW;
 			/*
 			 * For RS ECC, HW reports the erased CW by placing
 			 * special characters at certain offsets in the buffer.