lkml.org 
[lkml]   [2020]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/5] rcu/rcutorture: replace 0 with false
Date
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@gmail.com>
---
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
\
 
 \ /
  Last update: 2020-06-01 20:46    [W:0.191 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site