linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH linux-next] include:crash_dump: fix boolreturn.cocci warnings
@ 2021-08-24  6:01 CGEL
  2021-08-27  3:08 ` Dave Young
  0 siblings, 1 reply; 2+ messages in thread
From: CGEL @ 2021-08-24  6:01 UTC (permalink / raw)
  To: Dave Young
  Cc: Baoquan He, Vivek Goyal, kexec, linux-kernel, Jing Yangyang, Zeal Robot

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

./include/linux/crash_dump.h:98: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.

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>
---
 include/linux/crash_dump.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/crash_dump.h b/include/linux/crash_dump.h
index a5192b7..f92ebfe 100644
--- a/include/linux/crash_dump.h
+++ b/include/linux/crash_dump.h
@@ -95,7 +95,7 @@ static inline void vmcore_unusable(void)
 extern void unregister_oldmem_pfn_is_ram(void);
 
 #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 */
-- 
1.8.3.1



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

* Re: [PATCH linux-next] include:crash_dump: fix boolreturn.cocci warnings
  2021-08-24  6:01 [PATCH linux-next] include:crash_dump: fix boolreturn.cocci warnings CGEL
@ 2021-08-27  3:08 ` Dave Young
  0 siblings, 0 replies; 2+ messages in thread
From: Dave Young @ 2021-08-27  3:08 UTC (permalink / raw)
  To: CGEL
  Cc: Baoquan He, Vivek Goyal, kexec, linux-kernel, Jing Yangyang, Zeal Robot

On 08/23/21 at 11:01pm, CGEL wrote:
> From: Jing Yangyang <jing.yangyang@zte.com.cn>
> 
> ./include/linux/crash_dump.h:98: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.
> 
> 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>
> ---
>  include/linux/crash_dump.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/linux/crash_dump.h b/include/linux/crash_dump.h
> index a5192b7..f92ebfe 100644
> --- a/include/linux/crash_dump.h
> +++ b/include/linux/crash_dump.h
> @@ -95,7 +95,7 @@ static inline void vmcore_unusable(void)
>  extern void unregister_oldmem_pfn_is_ram(void);
>  
>  #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 */
> -- 
> 1.8.3.1
> 
> 

Acked-by: Dave Young <dyoung@redhat.com>

Thanks
Dave


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

end of thread, other threads:[~2021-08-27  3:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-24  6:01 [PATCH linux-next] include:crash_dump: fix boolreturn.cocci warnings CGEL
2021-08-27  3:08 ` Dave Young

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).