LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH linux-next] x86:uv: fix boolreturn.cocci warnings
@ 2021-08-24  7:21 CGEL
  2021-08-24 15:44 ` Steve Wahl
  2021-08-26 22:43 ` Thomas Gleixner
  0 siblings, 2 replies; 3+ messages in thread
From: CGEL @ 2021-08-24  7:21 UTC (permalink / raw)
  To: Steve Wahl
  Cc: Mike Travis, Dimitri Sivanich, Russ Anderson, Thomas Gleixner,
	x86, linux-kernel, Jing Yangyang, Zeal Robot

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

./arch/x86/include/asm/uv/uv.h:36:53-54:WARNING:return of 0/1 in
function 'is_early_uv_system' 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>
---
 arch/x86/include/asm/uv/uv.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/include/asm/uv/uv.h b/arch/x86/include/asm/uv/uv.h
index 648eb23..9395925 100644
--- a/arch/x86/include/asm/uv/uv.h
+++ b/arch/x86/include/asm/uv/uv.h
@@ -33,7 +33,7 @@ static inline bool is_early_uv_system(void)
 #else	/* !X86_UV */
 
 static inline enum uv_system_type get_uv_system_type(void) { return UV_NONE; }
-static inline bool is_early_uv_system(void)	{ return 0; }
+static inline bool is_early_uv_system(void)	{ return false; }
 static inline int is_uv_system(void)	{ return 0; }
 static inline int is_uv_hubbed(int uv)	{ return 0; }
 static inline void uv_cpu_init(void)	{ }
-- 
1.8.3.1



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

* Re: [PATCH linux-next] x86:uv: fix boolreturn.cocci warnings
  2021-08-24  7:21 [PATCH linux-next] x86:uv: fix boolreturn.cocci warnings CGEL
@ 2021-08-24 15:44 ` Steve Wahl
  2021-08-26 22:43 ` Thomas Gleixner
  1 sibling, 0 replies; 3+ messages in thread
From: Steve Wahl @ 2021-08-24 15:44 UTC (permalink / raw)
  To: CGEL
  Cc: Steve Wahl, Mike Travis, Dimitri Sivanich, Russ Anderson,
	Thomas Gleixner, x86, linux-kernel, Jing Yangyang, Zeal Robot

Reviewed-by: Steve Wahl <steve.wahl@hpe.com>

On Tue, Aug 24, 2021 at 12:21:24AM -0700, CGEL wrote:
> From: Jing Yangyang <jing.yangyang@zte.com.cn>
> 
> ./arch/x86/include/asm/uv/uv.h:36:53-54:WARNING:return of 0/1 in
> function 'is_early_uv_system' 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>
> ---
>  arch/x86/include/asm/uv/uv.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/include/asm/uv/uv.h b/arch/x86/include/asm/uv/uv.h
> index 648eb23..9395925 100644
> --- a/arch/x86/include/asm/uv/uv.h
> +++ b/arch/x86/include/asm/uv/uv.h
> @@ -33,7 +33,7 @@ static inline bool is_early_uv_system(void)
>  #else	/* !X86_UV */
>  
>  static inline enum uv_system_type get_uv_system_type(void) { return UV_NONE; }
> -static inline bool is_early_uv_system(void)	{ return 0; }
> +static inline bool is_early_uv_system(void)	{ return false; }
>  static inline int is_uv_system(void)	{ return 0; }
>  static inline int is_uv_hubbed(int uv)	{ return 0; }
>  static inline void uv_cpu_init(void)	{ }
> -- 
> 1.8.3.1
> 
> 

-- 
Steve Wahl, Hewlett Packard Enterprise

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

* Re: [PATCH linux-next] x86:uv: fix boolreturn.cocci warnings
  2021-08-24  7:21 [PATCH linux-next] x86:uv: fix boolreturn.cocci warnings CGEL
  2021-08-24 15:44 ` Steve Wahl
@ 2021-08-26 22:43 ` Thomas Gleixner
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Gleixner @ 2021-08-26 22:43 UTC (permalink / raw)
  To: CGEL, Steve Wahl
  Cc: Mike Travis, Dimitri Sivanich, Russ Anderson, x86, linux-kernel,
	Jing Yangyang, Zeal Robot

On Tue, Aug 24 2021 at 00:21, CGEL wrote:

This mail originates from: CGEL <cgel.zte@gmail.com>

which is not related to:

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

Please ensure that the chain of origin is intact. See Documentation/process/*

Thanks

        tglx

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

end of thread, other threads:[~2021-08-26 22:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-24  7:21 [PATCH linux-next] x86:uv: fix boolreturn.cocci warnings CGEL
2021-08-24 15:44 ` Steve Wahl
2021-08-26 22:43 ` Thomas Gleixner

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