All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH linux-next] arm:nommu: fix boolreturn.cocci warnings
@ 2021-08-24  4:11 ` CGEL
  0 siblings, 0 replies; 4+ messages in thread
From: CGEL @ 2021-08-24  4:11 UTC (permalink / raw)
  To: Russell King
  Cc: Stephen Rothwell, Andrew Morton, Ira Weiny, linux-arm-kernel,
	linux-kernel, Jing Yangyang, Zeal Robot

From: Jing Yangyang <jing.yangyang@zte.com.cn>

./arch/arm/mm/nommu.c:59:8-9:WARNING:return of 0/1 in function
'security_extensions_enabled' 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@zte.com.cn>
Signed-off-by: Jing Yangyang <jing.yangyang@zte.com.cn>
---
 arch/arm/mm/nommu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mm/nommu.c b/arch/arm/mm/nommu.c
index 2658f52..7256ac1 100644
--- a/arch/arm/mm/nommu.c
+++ b/arch/arm/mm/nommu.c
@@ -56,7 +56,7 @@ static inline bool security_extensions_enabled(void)
 	if ((read_cpuid_id() & 0x000f0000) == 0x000f0000)
 		return cpuid_feature_extract(CPUID_EXT_PFR1, 4) ||
 			cpuid_feature_extract(CPUID_EXT_PFR1, 20);
-	return 0;
+	return false;
 }
 
 unsigned long setup_vectors_base(void)
-- 
1.8.3.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-08-24  8:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-24  4:11 [PATCH linux-next] arm:nommu: fix boolreturn.cocci warnings CGEL
2021-08-24  4:11 ` CGEL
2021-08-24  8:25 ` Vladimir Murzin
2021-08-24  8:25   ` Vladimir Murzin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.