[PATCH 1/5] rcu/rcutorture: replace 0 with false

From: Jules Irenge
Date: Mon Jun 01 2020 - 14:46:50 EST


Coccinelle reports a warning

WARNING: Assignment of 0/1 to bool variable

The root cause is the variable lastphase is of bool type is initialised with integer 0
Replacing 0 with false fixes the issue.

Signed-off-by: Jules Irenge <jbi.octave@xxxxxxxxx>
---
kernel/rcu/rcutorture.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
index 5453bd557f43..a082bc402f9b 100644
--- a/kernel/rcu/rcutorture.c
+++ b/kernel/rcu/rcutorture.c
@@ -2065,7 +2065,7 @@ static void rcu_torture_barrier1cb(void *rcu_void)
static int rcu_torture_barrier_cbs(void *arg)
{
long myid = (long)arg;
- bool lastphase = 0;
+ bool lastphase = false;
bool newphase;
struct rcu_head rcu;

--
2.18.2