[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20210824071557.61426-1-deng.changcheng@zte.com.cn>
Date: Tue, 24 Aug 2021 00:15:57 -0700
From: CGEL <cgel.zte@...il.com>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
x86@...nel.org, "H . Peter Anvin" <hpa@...or.com>,
linux-kernel@...r.kernel.org,
Jing Yangyang <jing.yangyang@....com.cn>,
Zeal Robot <zealci@....com.cn>
Subject: [PATCH linux-next] x86:sections: fix boolreturn.cocci warnings
From: Jing Yangyang <jing.yangyang@....com.cn>
./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@....com.cn>
Signed-off-by: Jing Yangyang <jing.yangyang@....com.cn>
---
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
Powered by blists - more mailing lists