lkml.org 
[lkml]   [2018]   [Dec]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] cpu: Bool tests don't need comparisons
Date
This is the patch to the file cpu.c
which fixes the following coccinelle warning:

WARNING: Comparison to bool

Signed-off-by: Wen Yang <wen.yang99@zte.com.cn>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Ingo Molnar <mingo@kernel.org>
CC: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CC: Josh Poimboeuf <jpoimboe@redhat.com>
CC: "Peter Zijlstra (Intel)" <peterz@infraded.org>
CC: Peter Zijlstra <peterz@infradead.org>
CC: Mukesh Ojha <mojha@codeaurora.org>
CC: linux-kernel@vger.kernel.org
---
kernel/cpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/cpu.c b/kernel/cpu.c
index 91d5c38eb7e5..5bdd7e150a11 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -1650,7 +1650,7 @@ int __cpuhp_state_add_instance_cpuslocked(enum cpuhp_state state,
lockdep_assert_cpus_held();

sp = cpuhp_get_step(state);
- if (sp->multi_instance == false)
+ if (!sp->multi_instance)
return -EINVAL;

mutex_lock(&cpuhp_state_mutex);
--
2.19.1
\
 
 \ /
  Last update: 2018-12-01 09:06    [W:0.033 / U:1.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site