Skip to contentSkip to conversation

x86/kaslr: Return true/false (not 1/0) from bool functions

PATCH Applied Jiapeng Chong 2 participants 2 messages Apr 21, 2022 – Nov 19, 2022 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/kaslr: Return true/false (not 1/0) from bool functions

Fix the following coccicheck warning:

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

---
 arch/x86/boot/compressed/kaslr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/boot/compressed/kaslr.c +1 -1
index 4a3f223973f4..43995c59e652 100644
@@ -667,7 +667,7 @@ static bool process_mem_region(struct mem_vector *region,
 		}
 	}
 #endif
-	return 0;
+	return false;
 }
 
 #ifdef CONFIG_EFI
Signature · 1 line
2.20.1.7.g153144c
merge bot Applied
#1 lore raw

[tip: x86/cleanups] x86/kaslr: Fix process_mem_region()'s return value

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:     ee92fa03918d114d3ac9c36a8bf2c032ede75a3b
Gitweb:        https://git.kernel.org/tip/ee92fa03918d114d3ac9c36a8bf2c032ede75a3b
Author:        Jiapeng Chong <[email protected]>
AuthorDate:    Fri, 22 Apr 2022 04:25:56 +08:00
Committer:     Borislav Petkov <[email protected]>
CommitterDate: Sat, 19 Nov 2022 17:35:10 +01:00

x86/kaslr: Fix process_mem_region()'s return value

Fix the following coccicheck warning:

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

---
 arch/x86/boot/compressed/kaslr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/boot/compressed/kaslr.c +1 -1
index e476bcb..454757f 100644
@@ -668,7 +668,7 @@ static bool process_mem_region(struct mem_vector *region,
 		}
 	}
 #endif
-	return 0;
+	return false;
 }
 
 #ifdef CONFIG_EFI