[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1615283963-67277-1-git-send-email-jiapeng.chong@linux.alibaba.com>
Date: Tue, 9 Mar 2021 17:59:23 +0800
From: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
To: tglx@...utronix.de
Cc: mingo@...hat.com, bp@...en8.de, x86@...nel.org, hpa@...or.com,
linux-kernel@...r.kernel.org,
Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
Subject: [PATCH] x86/kaslr: Assign boolean values to a bool variable
Fix the following coccicheck warnings:
./arch/x86/boot/compressed/kaslr.c:642:10-11: WARNING: return of 0/1 in
function 'process_mem_region' with return type bool.
Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
---
arch/x86/boot/compressed/kaslr.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/boot/compressed/kaslr.c b/arch/x86/boot/compressed/kaslr.c
index b92fffb..e366907 100644
--- a/arch/x86/boot/compressed/kaslr.c
+++ b/arch/x86/boot/compressed/kaslr.c
@@ -639,9 +639,9 @@ static bool process_mem_region(struct mem_vector *region,
if (slot_area_index == MAX_SLOT_AREA) {
debug_putstr("Aborted e820/efi memmap scan (slot_areas full)!\n");
- return 1;
+ return true;
}
- return 0;
+ return false;
}
#if defined(CONFIG_MEMORY_HOTREMOVE) && defined(CONFIG_ACPI)
--
1.8.3.1
Powered by blists - more mailing lists