Commit b91857a5 authored by Jason Yan's avatar Jason Yan Committed by Martin K. Petersen

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

Fix the following coccicheck warning:

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

Link: https://lore.kernel.org/r/20200430121718.14970-1-yanaijie@huawei.comSigned-off-by: default avatarJason Yan <yanaijie@huawei.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 9187745c
...@@ -2624,8 +2624,8 @@ int fnic_host_reset(struct scsi_cmnd *sc) ...@@ -2624,8 +2624,8 @@ int fnic_host_reset(struct scsi_cmnd *sc)
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&fnic->fnic_lock, flags); spin_lock_irqsave(&fnic->fnic_lock, flags);
if (fnic->internal_reset_inprogress == 0) { if (!fnic->internal_reset_inprogress) {
fnic->internal_reset_inprogress = 1; fnic->internal_reset_inprogress = true;
} else { } else {
spin_unlock_irqrestore(&fnic->fnic_lock, flags); spin_unlock_irqrestore(&fnic->fnic_lock, flags);
FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host,
...@@ -2654,7 +2654,7 @@ int fnic_host_reset(struct scsi_cmnd *sc) ...@@ -2654,7 +2654,7 @@ int fnic_host_reset(struct scsi_cmnd *sc)
} }
spin_lock_irqsave(&fnic->fnic_lock, flags); spin_lock_irqsave(&fnic->fnic_lock, flags);
fnic->internal_reset_inprogress = 0; fnic->internal_reset_inprogress = false;
spin_unlock_irqrestore(&fnic->fnic_lock, flags); spin_unlock_irqrestore(&fnic->fnic_lock, flags);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment