Thread (3 messages) flat view 3 messages, 2 authors, 2021-08-25
STALE1815d

[PATCH linux-next] tools:signal: fix boolreturn.cocci warnings

From: CGEL <hidden>
Date: 2021-08-24 06:51:42
Also in: linux-kselftest, lkml
Subsystem: arm64 port (aarch64 architecture), kernel selftest framework, the rest · Maintainers: Catalin Marinas, Will Deacon, Shuah Khan, Shuah Khan, Linus Torvalds

From: Jing Yangyang <redacted>

./tools/testing/selftests/arm64/signal/test_signals_utils.h:112:9-10
WARNING: return of 0/1 in function 'get_current_context' 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 <redacted>
Signed-off-by: Jing Yangyang <redacted>
---
 tools/testing/selftests/arm64/signal/test_signals_utils.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/arm64/signal/test_signals_utils.h b/tools/testing/selftests/arm64/signal/test_signals_utils.h
index 6772b5c..66122e6 100644
--- a/tools/testing/selftests/arm64/signal/test_signals_utils.h
+++ b/tools/testing/selftests/arm64/signal/test_signals_utils.h
@@ -109,7 +109,7 @@ static __always_inline bool get_current_context(struct tdescr *td,
 	if (seen_already) {
 		fprintf(stdout,
 			"Unexpected successful sigreturn detected: live_uc is stale !\n");
-		return 0;
+		return false;
 	}
 	seen_already = 1;
 
-- 
1.8.3.1



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help