Skip to contentSkip to conversation

cxl: remove unneeded conversions to bool

PATCH New Andrew F. Davis 1 participant 2 messages Oct 16, 2019

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 2/10 cxl: remove unneeded conversions to bool

Found with scripts/coccinelle/misc/boolconv.cocci.

---
 drivers/misc/cxl/sysfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/cxl/sysfs.c +1 -1
index f0263d1a1fdf..c57ec87bc0a6 100644
@@ -178,7 +178,7 @@ static ssize_t perst_reloads_same_image_store(struct device *device,
 	if ((rc != 1) || !(val = 1 || val = 0))
 		return -EINVAL;
 
-	adapter->perst_same_image = (val = 1 ? true : false);
+	adapter->perst_same_image = (val = 1);
 	return count;
 }
 
Signature · 1 line
2.17.1
#1 lore raw

PATCH 3/10 mtd: nand: qcom: remove unneeded conversions to bool

Found with scripts/coccinelle/misc/boolconv.cocci.

---
 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 7bb9a7e8e1e7..b437b0c79cf2 100644
@@ -1767,8 +1767,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 · 1 line
2.17.1