Skip to content

Commit 3765f6f

Browse files
author
Baoquan He
committed
crash_dump: fix boolreturn.cocci warning
JIRA: https://issues.redhat.com/browse/RHEL-32199 Upstream Status: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git commit 5605f41 Author: Changcheng Deng <deng.changcheng@zte.com.cn> Date: Mon Nov 8 18:35:07 2021 -0800 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 Signed-off-by: Changcheng Deng <deng.changcheng@zte.com.cn> Reported-by: Zeal Robot <zealci@zte.com.cn> Reviewed-by: Simon Horman <horms@kernel.org> Acked-by: Baoquan He <bhe@redhat.com> Cc: Dave Young <dyoung@redhat.com> Cc: Mike Rapoport <rppt@linux.ibm.com> Cc: Vivek Goyal <vgoyal@redhat.com> Cc: Ye Guojin <ye.guojin@zte.com.cn> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Baoquan He <bhe@redhat.com>
1 parent 8147b98 commit 3765f6f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/linux/crash_dump.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ extern void register_vmcore_cb(struct vmcore_cb *cb);
117117
extern void unregister_vmcore_cb(struct vmcore_cb *cb);
118118

119119
#else /* !CONFIG_CRASH_DUMP */
120-
static inline bool is_kdump_kernel(void) { return 0; }
120+
static inline bool is_kdump_kernel(void) { return false; }
121121
#endif /* CONFIG_CRASH_DUMP */
122122

123123
/* Device Dump information to be filled by drivers */

0 commit comments

Comments
 (0)