Message ID | 1611127919-56551-1-git-send-email-abaci-bugfix@linux.alibaba.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | scsi: qla2xxx: Assign boolean values to a bool variable | expand |
Jiapeng, > ./drivers/scsi/qla2xxx/qla_isr.c:780:2-18: WARNING: Assignment > of 0/1 to bool variable. Applied to 5.12/scsi-staging, thanks!
On Wed, 20 Jan 2021 15:31:59 +0800, Jiapeng Zhong wrote: > Fix the following coccicheck warnings: > > ./drivers/scsi/qla2xxx/qla_isr.c:780:2-18: WARNING: Assignment > of 0/1 to bool variable. Applied to 5.12/scsi-queue, thanks! [1/1] scsi: qla2xxx: Assign boolean values to a bool variable https://git.kernel.org/mkp/scsi/c/71311be1cd3e
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index f9142db..77a7acd 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c @@ -761,7 +761,7 @@ static struct purex_item *qla27xx_copy_fpin_pkt(struct scsi_qla_host *vha, qla27xx_handle_8200_aen(scsi_qla_host_t *vha, uint16_t *mb) { struct qla_hw_data *ha = vha->hw; - bool reset_isp_needed = 0; + bool reset_isp_needed = false; ql_log(ql_log_warn, vha, 0x02f0, "MPI Heartbeat stop. MPI reset is%s needed. " @@ -777,7 +777,7 @@ static struct purex_item *qla27xx_copy_fpin_pkt(struct scsi_qla_host *vha, if (ql2xfulldump_on_mpifail) { ha->isp_ops->fw_dump(vha); - reset_isp_needed = 1; + reset_isp_needed = true; } ha->isp_ops->mpi_fw_dump(vha, 1);
Fix the following coccicheck warnings: ./drivers/scsi/qla2xxx/qla_isr.c:780:2-18: WARNING: Assignment of 0/1 to bool variable. Reported-by: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: Jiapeng Zhong <abaci-bugfix@linux.alibaba.com> --- drivers/scsi/qla2xxx/qla_isr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)