Skip to contentSkip to conversation

x86/kaslr: Assign boolean values to a bool variable

PATCH Applied Jiapeng Chong 2 participants 2 messages Mar 9, 2021 – Mar 19, 2021 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 arch/x86/boot/compressed/kaslr.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/x86/boot/compressed/kaslr.c +2 -2
index b92fffb..e366907 100644
@@ -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)
Signature · 1 line
1.8.3.1
merge bot Applied
#1 lore raw

[tip: x86/cleanups] x86/kaslr: Return boolean values from a function returning bool

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

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

Commit-ID:     21d6a7dcbfba5e7b31f4e9d555a9be362578bfc3
Gitweb:        https://git.kernel.org/tip/21d6a7dcbfba5e7b31f4e9d555a9be362578bfc3
Author:        Jiapeng Chong <[email protected]>
AuthorDate:    Tue, 09 Mar 2021 17:59:23 +08:00
Committer:     Borislav Petkov <[email protected]>
CommitterDate: Fri, 19 Mar 2021 13:25:07 +01:00

x86/kaslr: Return boolean values from a function returning bool

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.

---
 arch/x86/boot/compressed/kaslr.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/x86/boot/compressed/kaslr.c +2 -2
index b92fffb..e366907 100644
@@ -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)