Skip to contentSkip to conversation

scsi: mpt3sas: style: Simplify bool comparison

PATCH Applied YANG LI 2 participants 3 messages Jan 11, 2021 – Jan 27, 2021

Subsystems (2)
lore
Share & tools
lore

YANG LI

author
#0 lore raw

PATCH 1/1 scsi: mpt3sas: style: Simplify bool comparison

Fix the following coccicheck warning:
./drivers/scsi/mpt3sas/mpt3sas_base.c:2424:5-20: WARNING: Comparison of 0/1 to bool variable

---
 drivers/scsi/mpt3sas/mpt3sas_base.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/mpt3sas/mpt3sas_base.c +2 -2
index 6e23dc3..f5582c8 100644
@@ -2505,8 +2505,8 @@ static u32 base_mod64(u64 dividend, u32 divisor)
 	}
 
 	/* Check if we need to build a native SG list. */
-	if (base_is_prp_possible(ioc, pcie_device,
-				scmd, sges_left) == 0) {
+	if (!base_is_prp_possible(ioc, pcie_device,
+				scmd, sges_left)) {
 		/* We built a native SG list, just return. */
 		goto out;
 	}
Signature · 1 line
1.8.3.1
#1 lore raw

Yang,

Quoted 3 lines

Fix the following coccicheck warning:
./drivers/scsi/mpt3sas/mpt3sas_base.c:2424:5-20: WARNING: Comparison of 0/1 to bool variable

Applied to 5.12/scsi-staging, thanks!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering