[PATCH] x86/kaslr: fix boolreturn.cocci warning

From: cgel . zte
Date: Mon Nov 01 2021 - 04:50:00 EST


From: Changcheng Deng <deng.changcheng@xxxxxxxxxx>

./arch/x86/boot/compressed/kaslr.c: 671: 8-9: WARNING: return of 0/1 in
function 'process_mem_region' with return type bool

Return statements in functions returning bool should use true/false
instead of 1/0.

Reported-by: Zeal Robot <zealci@xxxxxxxxxx>
Signed-off-by: Changcheng Deng <deng.changcheng@xxxxxxxxxx>
---
arch/x86/boot/compressed/kaslr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/boot/compressed/kaslr.c b/arch/x86/boot/compressed/kaslr.c
index 67c3208b668a..a4a10c7c5330 100644
--- a/arch/x86/boot/compressed/kaslr.c
+++ b/arch/x86/boot/compressed/kaslr.c
@@ -672,7 +672,7 @@ static bool process_mem_region(struct mem_vector *region,
}
}
#endif
- return 0;
+ return false;
}

#ifdef CONFIG_EFI
--
2.25.1