]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
arm64: alternative: Use true and false for boolean values
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Tue, 7 Aug 2018 23:59:57 +0000 (18:59 -0500)
committerWill Deacon <will.deacon@arm.com>
Wed, 8 Aug 2018 10:20:54 +0000 (11:20 +0100)
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.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/kernel/alternative.c

index 36fb069fd049c7053f38b75b9916bba7cb630643..b5d603992d4012201fbd0f655a9bde73eb77e5cb 100644 (file)
@@ -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