diff mbox series

scsi: fnic: use true,false for fnic->internal_reset_inprogress

Message ID 20200430121718.14970-1-yanaijie@huawei.com (mailing list archive)
State Mainlined
Commit b91857a5ca13cc7e6e7fe904d7f4ad64d44aee04
Headers show
Series scsi: fnic: use true,false for fnic->internal_reset_inprogress | expand

Commit Message

Jason Yan April 30, 2020, 12:17 p.m. UTC
Fix the following coccicheck warning:

drivers/scsi/fnic/fnic_scsi.c:2627:5-36: WARNING: Comparison of 0/1 to
bool variable

Signed-off-by: Jason Yan <yanaijie@huawei.com>
---
 drivers/scsi/fnic/fnic_scsi.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Martin K. Petersen May 8, 2020, 2:54 a.m. UTC | #1
On Thu, 30 Apr 2020 20:17:18 +0800, Jason Yan wrote:

> Fix the following coccicheck warning:
> 
> drivers/scsi/fnic/fnic_scsi.c:2627:5-36: WARNING: Comparison of 0/1 to
> bool variable

Applied to 5.8/scsi-queue, thanks!

[1/1] scsi: fnic: Use true, false for fnic->internal_reset_inprogress
      https://git.kernel.org/mkp/scsi/c/b91857a5ca13
diff mbox series

Patch

diff --git a/drivers/scsi/fnic/fnic_scsi.c b/drivers/scsi/fnic/fnic_scsi.c
index b60795893994..27535c90b248 100644
--- a/drivers/scsi/fnic/fnic_scsi.c
+++ b/drivers/scsi/fnic/fnic_scsi.c
@@ -2624,8 +2624,8 @@  int fnic_host_reset(struct scsi_cmnd *sc)
 	unsigned long flags;
 
 	spin_lock_irqsave(&fnic->fnic_lock, flags);
-	if (fnic->internal_reset_inprogress == 0) {
-		fnic->internal_reset_inprogress = 1;
+	if (!fnic->internal_reset_inprogress) {
+		fnic->internal_reset_inprogress = true;
 	} else {
 		spin_unlock_irqrestore(&fnic->fnic_lock, flags);
 		FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host,
@@ -2654,7 +2654,7 @@  int fnic_host_reset(struct scsi_cmnd *sc)
 	}
 
 	spin_lock_irqsave(&fnic->fnic_lock, flags);
-	fnic->internal_reset_inprogress = 0;
+	fnic->internal_reset_inprogress = false;
 	spin_unlock_irqrestore(&fnic->fnic_lock, flags);
 	return ret;
 }