scsi: isci: Use true, false for bool variables
authorJason Yan <yanaijie@huawei.com>
Tue, 21 Apr 2020 03:40:50 +0000 (11:40 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 24 Apr 2020 22:21:15 +0000 (18:21 -0400)
Fix the following coccicheck warning:

drivers/scsi/isci/isci.h:515:1-12: WARNING: Assignment of 0/1 to bool
variable
drivers/scsi/isci/isci.h:503:1-12: WARNING: Assignment of 0/1 to bool
variable
drivers/scsi/isci/isci.h:509:1-12: WARNING: Assignment of 0/1 to bool
variable

Link: https://lore.kernel.org/r/20200421034050.28193-1-yanaijie@huawei.com
Signed-off-by: Jason Yan <yanaijie@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/isci/isci.h

index 680e309..4e6b1de 100644 (file)
@@ -500,19 +500,19 @@ struct sci_timer {
 static inline
 void sci_init_timer(struct sci_timer *tmr, void (*fn)(struct timer_list *t))
 {
-       tmr->cancel = 0;
+       tmr->cancel = false;
        timer_setup(&tmr->timer, fn, 0);
 }
 
 static inline void sci_mod_timer(struct sci_timer *tmr, unsigned long msec)
 {
-       tmr->cancel = 0;
+       tmr->cancel = false;
        mod_timer(&tmr->timer, jiffies + msecs_to_jiffies(msec));
 }
 
 static inline void sci_del_timer(struct sci_timer *tmr)
 {
-       tmr->cancel = 1;
+       tmr->cancel = true;
        del_timer(&tmr->timer);
 }