linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86/kaslr: fix boolreturn.cocci warning
@ 2021-11-01  8:49 cgel.zte
  0 siblings, 0 replies; only message in thread
From: cgel.zte @ 2021-11-01  8:49 UTC (permalink / raw)
  To: tglx
  Cc: mingo, bp, x86, hpa, deng.changcheng, jiapeng.chong,
	linux-kernel, Zeal Robot

From: Changcheng Deng <deng.changcheng@zte.com.cn>

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

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

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Changcheng Deng <deng.changcheng@zte.com.cn>
---
 arch/x86/boot/compressed/kaslr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/boot/compressed/kaslr.c b/arch/x86/boot/compressed/kaslr.c
index 67c3208b668a..a4a10c7c5330 100644
--- a/arch/x86/boot/compressed/kaslr.c
+++ b/arch/x86/boot/compressed/kaslr.c
@@ -672,7 +672,7 @@ static bool process_mem_region(struct mem_vector *region,
 		}
 	}
 #endif
-	return 0;
+	return false;
 }
 
 #ifdef CONFIG_EFI
-- 
2.25.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-11-01  8:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-01  8:49 [PATCH] x86/kaslr: fix boolreturn.cocci warning cgel.zte

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).