[tip: x86/cleanups] x86/kaslr: Have process_mem_region() return a boolean

From: tip-bot2 for Jing Yangyang
Date: Tue Aug 24 2021 - 05:27:51 EST


The following commit has been merged into the x86/cleanups branch of tip:

Commit-ID: 5b3fd8aa5df0244fc19f2572598dee406bcc6b07
Gitweb: https://git.kernel.org/tip/5b3fd8aa5df0244fc19f2572598dee406bcc6b07
Author: Jing Yangyang <jing.yangyang@xxxxxxxxxx>
AuthorDate: Tue, 24 Aug 2021 00:05:15 -07:00
Committer: Borislav Petkov <bp@xxxxxxx>
CommitterDate: Tue, 24 Aug 2021 10:54:15 +02:00

x86/kaslr: Have process_mem_region() return a boolean

Fix the following coccicheck warning:

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

Generated by: scripts/coccinelle/misc/boolreturn.cocci

Reported-by: Zeal Robot <zealci@xxxxxxxxxx>
Signed-off-by: Jing Yangyang <jing.yangyang@xxxxxxxxxx>
Signed-off-by: Borislav Petkov <bp@xxxxxxx>
Link: https://lkml.kernel.org/r/20210824070515.61065-1-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 e366907..67c3208 100644
--- a/arch/x86/boot/compressed/kaslr.c
+++ b/arch/x86/boot/compressed/kaslr.c
@@ -668,7 +668,7 @@ static bool process_mem_region(struct mem_vector *region,

if (slot_area_index == MAX_SLOT_AREA) {
debug_putstr("Aborted e820/efi memmap scan when walking immovable regions(slot_areas full)!\n");
- return 1;
+ return true;
}
}
#endif