linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scsi: isci: use true,false for bool variables
@ 2020-04-21  3:40 Jason Yan
  2020-04-27 20:21 ` Martin K. Petersen
  0 siblings, 1 reply; 2+ messages in thread
From: Jason Yan @ 2020-04-21  3:40 UTC (permalink / raw)
  To: intel-linux-scu, artur.paszkiewicz, jejb, martin.petersen,
	yanaijie, linux-scsi, linux-kernel

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(-)

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);
 }
 
-- 
2.21.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] scsi: isci: use true,false for bool variables
  2020-04-21  3:40 [PATCH] scsi: isci: use true,false for bool variables Jason Yan
@ 2020-04-27 20:21 ` Martin K. Petersen
  0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2020-04-27 20:21 UTC (permalink / raw)
  To: artur.paszkiewicz, linux-kernel, intel-linux-scu, jejb,
	linux-scsi, Jason Yan
  Cc: Martin K . Petersen

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

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-04-27 20:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-21  3:40 [PATCH] scsi: isci: use true,false for bool variables Jason Yan
2020-04-27 20:21 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).