Skip to contentSkip to conversation

arm64: alternative: Use true and false for boolean values

PATCH New Gustavo A. R. Silva 1 participant 1 message Aug 7, 2018 arm64

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: alternative: Use true and false for boolean values

Return statements in functions returning bool should use true or false instead of an integer value. This code was detected with the help of Coccinelle.

---
 arch/arm64/kernel/alternative.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/kernel/alternative.c +2 -2
index 36fb069..b5d6039 100644
@@ -47,11 +47,11 @@ static bool branch_insn_requires_update(struct alt_instr *alt, unsigned long pc)
 	unsigned long replptr;
 
 	if (kernel_text_address(pc))
-		return 1;
+		return true;
 
 	replptr = (unsigned long)ALT_REPL_PTR(alt);
 	if (pc >= replptr && pc <= (replptr + alt->alt_len))
-		return 0;
+		return false;
 
 	/*
 	 * Branching into *another* alternate sequence is doomed, and
Signature · 1 line
2.7.4