Skip to contentSkip to conversation

mtd: rawnand: qcom: Simplify bool conversion

PATCH New Yang Li 1 participant 1 message Jan 29, 2021

Subsystems (3)
lore
Share & tools
lore

Yang Li

author
#0 lore raw

PATCH 1/1 mtd: rawnand: qcom: Simplify bool conversion

Fix the following coccicheck warning:
./drivers/mtd/nand/raw/qcom_nandc.c:1793:13-18: WARNING: conversion to bool not needed here

---
 drivers/mtd/nand/raw/qcom_nandc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/mtd/nand/raw/qcom_nandc.c +1 -2
index 667e4bf..a0410e0 100644
@@ -1789,8 +1789,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.
Signature · 6 lines
1.8.3.1


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