]> git.baikalelectronics.ru Git - kernel.git/commitdiff
powerpc/xive: Assign boolean values to a bool variable
authorJiapeng Chong <jiapeng.chong@linux.alibaba.com>
Sun, 7 Feb 2021 06:43:12 +0000 (14:43 +0800)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 11 Feb 2021 12:35:06 +0000 (23:35 +1100)
Fix the following coccicheck warnings:

./arch/powerpc/kvm/book3s_xive.c:1856:2-17: WARNING: Assignment of 0/1
to bool variable.

./arch/powerpc/kvm/book3s_xive.c:1854:2-17: WARNING: Assignment of 0/1
to bool variable.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/1612680192-43116-1-git-send-email-jiapeng.chong@linux.alibaba.com
arch/powerpc/kvm/book3s_xive.c

index 30dfeac731c6d668abe84fca7aa6e9c95679a0d5..e7219b6f5f9a5e98a4e2229d5e66a79792ca53da 100644 (file)
@@ -1813,9 +1813,9 @@ int kvmppc_xive_set_irq(struct kvm *kvm, int irq_source_id, u32 irq, int level,
                return -EINVAL;
 
        if ((level == 1 && state->lsi) || level == KVM_INTERRUPT_SET_LEVEL)
-               state->asserted = 1;
+               state->asserted = true;
        else if (level == 0 || level == KVM_INTERRUPT_UNSET) {
-               state->asserted = 0;
+               state->asserted = false;
                return 0;
        }