[PATCH linux-next] x86:sections: fix boolreturn.cocci warnings

From: CGEL
Date: Tue Aug 24 2021 - 03:16:08 EST


From: Jing Yangyang <jing.yangyang@xxxxxxxxxx>

./arch/x86/include/asm/sections.h:28:9-10:WARNING:return of 0/1 in
function 'arch_is_kernel_initmem_freed' with return type bool

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

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

Reported-by: Zeal Robot <zealci@xxxxxxxxxx>
Signed-off-by: Jing Yangyang <jing.yangyang@xxxxxxxxxx>
---
arch/x86/include/asm/sections.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/include/asm/sections.h b/arch/x86/include/asm/sections.h
index a6e8373..5396bc3 100644
--- a/arch/x86/include/asm/sections.h
+++ b/arch/x86/include/asm/sections.h
@@ -25,7 +25,7 @@ static inline bool arch_is_kernel_initmem_freed(unsigned long addr)
* and we can not make assumptions about its use.
*/
if (_brk_start)
- return 0;
+ return false;

/*
* After brk allocation is complete, space between _brk_end and _end
--
1.8.3.1