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.com Signed-off-by: Jason Yan <yanaijie@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
9187745cee
commit
b91857a5ca
|
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue