scsi: qedi: Remove comparison of 0/1 to bool variable
authorJason Yan <yanaijie@huawei.com>
Thu, 30 Apr 2020 12:17:06 +0000 (20:17 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 8 May 2020 02:02:19 +0000 (22:02 -0400)
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

Link: https://lore.kernel.org/r/20200430121706.14879-1-yanaijie@huawei.com
Acked-by: Manish Rangankar <mrangankar@marvell.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qedi/qedi_main.c

index 4dd9658..46584e1 100644 (file)
@@ -1306,13 +1306,13 @@ process_again:
                          "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;