From: Changcheng Deng <redacted>
Subject: crash_dump: fix boolreturn.cocci warning
./include/linux/crash_dump.h: 119: 50-51: WARNING: return of 0/1 in
function 'is_kdump_kernel' with return type bool
Return statements in functions returning bool should use true/false
instead of 1/0.
Link: https://lkml.kernel.org/r/20211020083905.1037952-1-deng.changcheng@zte.com.cn (local)
Signed-off-by: Changcheng Deng <redacted>
Reported-by: Zeal Robot <redacted>
Reviewed-by: Simon Horman <horms@kernel.org>
Acked-by: Baoquan He <redacted>
Cc: Dave Young <redacted>
Cc: Mike Rapoport <redacted>
Cc: Vivek Goyal <vgoyal@redhat.com>
Cc: Ye Guojin <redacted>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
include/linux/crash_dump.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/include/linux/crash_dump.h~crash_dump-fix-boolreturncocci-warning
+++ a/include/linux/crash_dump.h
@@ -116,7 +116,7 @@ extern void register_vmcore_cb(struct vm
extern void unregister_vmcore_cb(struct vmcore_cb *cb);
#else /* !CONFIG_CRASH_DUMP */
-static inline bool is_kdump_kernel(void) { return 0; }
+static inline bool is_kdump_kernel(void) { return false; }
#endif /* CONFIG_CRASH_DUMP */
/* Device Dump information to be filled by drivers */_