diff mbox series

scsi: isci: use true,false for bool variables

Message ID 20200421034050.28193-1-yanaijie@huawei.com (mailing list archive)
State Mainlined
Commit 8d5e202802a5de1f81c445cacbb9359fcd4e6f23
Headers show
Series scsi: isci: use true,false for bool variables | expand

Commit Message

Jason Yan April 21, 2020, 3:40 a.m. UTC
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

Signed-off-by: Jason Yan <yanaijie@huawei.com>
---
 drivers/scsi/isci/isci.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Martin K. Petersen April 27, 2020, 8:21 p.m. UTC | #1
On Tue, 21 Apr 2020 11:40:50 +0800, Jason Yan wrote:

> 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
> 
> [...]

Applied to 5.8/scsi-queue, thanks!

[1/1] scsi: isci: Use true, false for bool variables
      https://git.kernel.org/mkp/scsi/c/8d5e202802a5
diff mbox series

Patch

diff --git a/drivers/scsi/isci/isci.h b/drivers/scsi/isci/isci.h
index 680e30947671..4e6b1decbca7 100644
--- a/drivers/scsi/isci/isci.h
+++ b/drivers/scsi/isci/isci.h
@@ -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);
 }