diff mbox series

scsi: qla2xxx: use true,false for need_mpi_reset

Message ID 20200430121751.15232-1-yanaijie@huawei.com (mailing list archive)
State Mainlined
Commit bda552a7741a23708823c6e87a39d9a956087ac0
Headers show
Series scsi: qla2xxx: use true,false for need_mpi_reset | expand

Commit Message

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

drivers/scsi/qla2xxx/qla_tmpl.c:1031:6-20: WARNING: Assignment of 0/1 to
bool variable
drivers/scsi/qla2xxx/qla_tmpl.c:1062:3-17: WARNING: Assignment of 0/1 to
bool variable

Signed-off-by: Jason Yan <yanaijie@huawei.com>
---
 drivers/scsi/qla2xxx/qla_tmpl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Himanshu Madhani April 30, 2020, 1:17 p.m. UTC | #1
On 4/30/20 7:17 AM, Jason Yan wrote:
> Fix the following coccicheck warning:
> 
> drivers/scsi/qla2xxx/qla_tmpl.c:1031:6-20: WARNING: Assignment of 0/1 to
> bool variable
> drivers/scsi/qla2xxx/qla_tmpl.c:1062:3-17: WARNING: Assignment of 0/1 to
> bool variable
> 
> Signed-off-by: Jason Yan <yanaijie@huawei.com>
> ---
>   drivers/scsi/qla2xxx/qla_tmpl.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/qla2xxx/qla_tmpl.c b/drivers/scsi/qla2xxx/qla_tmpl.c
> index 819c46f31c05..281973b317a8 100644
> --- a/drivers/scsi/qla2xxx/qla_tmpl.c
> +++ b/drivers/scsi/qla2xxx/qla_tmpl.c
> @@ -1028,7 +1028,7 @@ void
>   qla27xx_mpi_fwdump(scsi_qla_host_t *vha, int hardware_locked)
>   {
>   	ulong flags = 0;
> -	bool need_mpi_reset = 1;
> +	bool need_mpi_reset = true;
>   
>   #ifndef __CHECKER__
>   	if (!hardware_locked)
> @@ -1059,7 +1059,7 @@ qla27xx_mpi_fwdump(scsi_qla_host_t *vha, int hardware_locked)
>   			       "-> fwdt1 fwdump residual=%+ld\n",
>   			       fwdt->dump_size - len);
>   		} else {
> -			need_mpi_reset = 0;
> +			need_mpi_reset = false;
>   		}
>   
>   		vha->hw->mpi_fw_dump_len = len;
> 

Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Martin K. Petersen May 8, 2020, 2:54 a.m. UTC | #2
On Thu, 30 Apr 2020 20:17:51 +0800, Jason Yan wrote:

> Fix the following coccicheck warning:
> 
> drivers/scsi/qla2xxx/qla_tmpl.c:1031:6-20: WARNING: Assignment of 0/1 to
> bool variable
> drivers/scsi/qla2xxx/qla_tmpl.c:1062:3-17: WARNING: Assignment of 0/1 to
> bool variable

Applied to 5.8/scsi-queue, thanks!

[1/1] scsi: qla2xxx: Use true, false for need_mpi_reset
      https://git.kernel.org/mkp/scsi/c/bda552a7741a
diff mbox series

Patch

diff --git a/drivers/scsi/qla2xxx/qla_tmpl.c b/drivers/scsi/qla2xxx/qla_tmpl.c
index 819c46f31c05..281973b317a8 100644
--- a/drivers/scsi/qla2xxx/qla_tmpl.c
+++ b/drivers/scsi/qla2xxx/qla_tmpl.c
@@ -1028,7 +1028,7 @@  void
 qla27xx_mpi_fwdump(scsi_qla_host_t *vha, int hardware_locked)
 {
 	ulong flags = 0;
-	bool need_mpi_reset = 1;
+	bool need_mpi_reset = true;
 
 #ifndef __CHECKER__
 	if (!hardware_locked)
@@ -1059,7 +1059,7 @@  qla27xx_mpi_fwdump(scsi_qla_host_t *vha, int hardware_locked)
 			       "-> fwdt1 fwdump residual=%+ld\n",
 			       fwdt->dump_size - len);
 		} else {
-			need_mpi_reset = 0;
+			need_mpi_reset = false;
 		}
 
 		vha->hw->mpi_fw_dump_len = len;