diff mbox series

scsi: qedi: remove Comparison of 0/1 to bool variable

Message ID 20200430121706.14879-1-yanaijie@huawei.com (mailing list archive)
State Mainlined
Commit 9187745ceec6ee94c28bba8e78ff9328719e18d3
Headers show
Series scsi: qedi: remove Comparison of 0/1 to bool variable | expand

Commit Message

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

drivers/scsi/qedi/qedi_main.c:1309:5-25: WARNING: Comparison of 0/1 to
bool variable
drivers/scsi/qedi/qedi_main.c:1315:5-25: WARNING: Comparison of 0/1 to
bool variable

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

Comments

Manish Rangankar May 6, 2020, 4:43 a.m. UTC | #1
> -----Original Message-----
> From: Jason Yan <yanaijie@huawei.com>
> Sent: Thursday, April 30, 2020 5:47 PM
> To: QLogic-Storage-Upstream@cavium.com; jejb@linux.ibm.com;
> martin.petersen@oracle.com; Manish Rangankar
> <mrangankar@marvell.com>; linux-scsi@vger.kernel.org; linux-
> kernel@vger.kernel.org
> Cc: Jason Yan <yanaijie@huawei.com>
> Subject: [EXT] [PATCH] scsi: qedi: remove Comparison of 0/1 to bool
> variable
> 
> External Email
> 
> ----------------------------------------------------------------------
> Fix the following coccicheck warning:
> 
> drivers/scsi/qedi/qedi_main.c:1309:5-25: WARNING: Comparison of 0/1 to
> bool variable
> drivers/scsi/qedi/qedi_main.c:1315:5-25: WARNING: Comparison of 0/1 to
> bool variable
> 
> Signed-off-by: Jason Yan <yanaijie@huawei.com>
> ---
>  drivers/scsi/qedi/qedi_main.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/qedi/qedi_main.c b/drivers/scsi/qedi/qedi_main.c
> index 4dd965860c98..46584e16d635 100644
> --- a/drivers/scsi/qedi/qedi_main.c
> +++ b/drivers/scsi/qedi/qedi_main.c
> @@ -1306,13 +1306,13 @@ static irqreturn_t qedi_msix_handler(int irq,
> void *dev_id)
>  			  "process already running\n");
>  	}
> 
> -	if (qedi_fp_has_work(fp) == 0)
> +	if (!qedi_fp_has_work(fp))
>  		qed_sb_update_sb_idx(fp->sb_info);
> 
>  	/* Check for more work */
>  	rmb();
> 
> -	if (qedi_fp_has_work(fp) == 0)
> +	if (!qedi_fp_has_work(fp))
>  		qed_sb_ack(fp->sb_info, IGU_INT_ENABLE, 1);
>  	else
>  		goto process_again;
> --

Thanks,
Acked-by: Manish Rangankar <mrangankar@marvell.com>
Martin K. Petersen May 8, 2020, 2:54 a.m. UTC | #2
On Thu, 30 Apr 2020 20:17:06 +0800, Jason Yan wrote:

> Fix the following coccicheck warning:
> 
> drivers/scsi/qedi/qedi_main.c:1309:5-25: WARNING: Comparison of 0/1 to
> bool variable
> drivers/scsi/qedi/qedi_main.c:1315:5-25: WARNING: Comparison of 0/1 to
> bool variable

Applied to 5.8/scsi-queue, thanks!

[1/1] scsi: qedi: Remove comparison of 0/1 to bool variable
      https://git.kernel.org/mkp/scsi/c/9187745ceec6
diff mbox series

Patch

diff --git a/drivers/scsi/qedi/qedi_main.c b/drivers/scsi/qedi/qedi_main.c
index 4dd965860c98..46584e16d635 100644
--- a/drivers/scsi/qedi/qedi_main.c
+++ b/drivers/scsi/qedi/qedi_main.c
@@ -1306,13 +1306,13 @@  static irqreturn_t qedi_msix_handler(int irq, void *dev_id)
 			  "process already running\n");
 	}
 
-	if (qedi_fp_has_work(fp) == 0)
+	if (!qedi_fp_has_work(fp))
 		qed_sb_update_sb_idx(fp->sb_info);
 
 	/* Check for more work */
 	rmb();
 
-	if (qedi_fp_has_work(fp) == 0)
+	if (!qedi_fp_has_work(fp))
 		qed_sb_ack(fp->sb_info, IGU_INT_ENABLE, 1);
 	else
 		goto process_again;