Subject: [PATCH] powerpc: fix boolreturn.cocci warnings

From: kernel test robot <[email-masked]>
Date: Thu, 3 Dec 2020 07:25:08 +0800

From: kernel test robot <[email-masked]>

arch/powerpc/kernel/firmware.c:31:9-10: WARNING: return of 0/1 in function 'check_kvm_guest' with return type bool

 Return statements in functions returning bool should use
 true/false instead of 1/0.
Generated by: scripts/coccinelle/misc/boolreturn.cocci

Fixes: 77354ecf8473 ("powerpc: Rename is_kvm_guest() to check_kvm_guest()")
CC: Srikar Dronamraju <[email-masked]>
Reported-by: kernel test robot <[email-masked]>
Signed-off-by: kernel test robot <[email-masked]>
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next-test
head:   fb003959777a635dea8910cf71109b612c7f940c
commit: 77354ecf8473208a5cc5f20a501760f7d6d631cd [121/184] powerpc: Rename is_kvm_guest() to check_kvm_guest()

 firmware.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- a/arch/powerpc/kernel/firmware.c
+++ b/arch/powerpc/kernel/firmware.c
@@ -28,11 +28,11 @@ bool check_kvm_guest(void)
 
 	hyper_node = of_find_node_by_path("/hypervisor");
 	if (!hyper_node)
-		return 0;
+		return false;
 
 	if (!of_device_is_compatible(hyper_node, "linux,kvm"))
-		return 0;
+		return false;
 
-	return 1;
+	return true;
 }
 #endif