Skip to contentSkip to conversation

scsi: qedf: style: Simplify bool comparison

PATCH Applied YANG LI 3 participants 4 messages Jan 11, 2021 – Jan 15, 2021

Subsystems (4)
lore
Share & tools
lore

YANG LI

author
#0 lore raw

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

Fix the following coccicheck warning:
./drivers/scsi/qedf/qedf_main.c:3716:5-31: WARNING: Comparison to bool

---
 drivers/scsi/qedf/qedf_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/qedf/qedf_main.c +1 -1
index 46d185c..cec27f2 100644
@@ -3713,7 +3713,7 @@ static void __qedf_remove(struct pci_dev *pdev, int mode)
 	else
 		fc_fabric_logoff(qedf->lport);
 
-	if (qedf_wait_for_upload(qedf) == false)
+	if (!qedf_wait_for_upload(qedf))
 		QEDF_ERR(&qedf->dbg_ctx, "Could not upload all sessions.\n");
 
 #ifdef CONFIG_DEBUG_FS
Signature · 1 line
1.8.3.1
maintainer Acked-by on v1 1/1
#1 lore raw

Hi,
Thanks for a patch.

Quoted 36 lines

-----Original Message-----
From: YANG LI <[email protected]>
Sent: Monday, January 11, 2021 2:59 PM
To: [email protected]
Cc: [email protected]; Saurav Kashyap <[email protected]>; Javed Hasan <[email protected]>; GR-QLogic-Storage-Upstream <GR- [email protected]>; [email protected]; linux- [email protected]; [email protected]; [email protected]; YANG LI <[email protected]>
Subject: [EXT] [PATCH] scsi: qedf: style: Simplify bool comparison

External Email

----------------------------------------------------------------------
Fix the following coccicheck warning:
./drivers/scsi/qedf/qedf_main.c:3716:5-31: WARNING: Comparison to bool

---
 drivers/scsi/qedf/qedf_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/qedf/qedf_main.c +1 -1
index 46d185c..cec27f2 100644
@@ -3713,7 +3713,7 @@ static void __qedf_remove(struct pci_dev *pdev, int
 mode)
 	else
 		fc_fabric_logoff(qedf->lport);
 
-	if (qedf_wait_for_upload(qedf) == false)
+	if (!qedf_wait_for_upload(qedf))
 		QEDF_ERR(&qedf->dbg_ctx, "Could not upload all sessions.\n");
 
Quoted 3 lines

#ifdef CONFIG_DEBUG_FS
--
1.8.3.1

#2 lore raw
In reply to YANG LI

Yang,

Quoted 2 lines

Fix the following coccicheck warning:
./drivers/scsi/qedf/qedf_main.c:3716:5-31: WARNING: Comparison to bool

Applied to 5.12/scsi-staging, thanks!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering