2021-01-11 13:04:42

by Abaci Team

[permalink] [raw]
Subject: [PATCH] scsi: qedf: style: Simplify bool comparison

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

Signed-off-by: YANG LI <[email protected]>
Reported-by: Abaci Robot<[email protected]>
---
drivers/scsi/qedf/qedf_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c
index 46d185c..cec27f2 100644
--- a/drivers/scsi/qedf/qedf_main.c
+++ b/drivers/scsi/qedf/qedf_main.c
@@ -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
--
1.8.3.1


2021-01-13 05:38:16

by Martin K. Petersen

[permalink] [raw]
Subject: Re: [PATCH] scsi: qedf: style: Simplify bool comparison


Yang,

> 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!

--
Martin K. Petersen Oracle Linux Engineering

2021-01-15 05:49:34

by Martin K. Petersen

[permalink] [raw]
Subject: Re: [PATCH] scsi: qedf: style: Simplify bool comparison

On Mon, 11 Jan 2021 17:29:28 +0800, YANG LI wrote:

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

Applied to 5.12/scsi-queue, thanks!

[1/1] scsi: qedf: style: Simplify bool comparison
https://git.kernel.org/mkp/scsi/c/ac341c2d2f1f

--
Martin K. Petersen Oracle Linux Engineering