2020-05-07 11:10:08

by Jason Yan

[permalink] [raw]
Subject: [PATCH] kgdb: Return true in kgdb_nmi_poll_knock()

Fix the following coccicheck warning:

include/linux/kgdb.h:301:54-55: WARNING: return of 0/1 in function
'kgdb_nmi_poll_knock' with return type bool

Signed-off-by: Jason Yan <[email protected]>
---
include/linux/kgdb.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/kgdb.h b/include/linux/kgdb.h
index b072aeb1fd78..042828aeb73d 100644
--- a/include/linux/kgdb.h
+++ b/include/linux/kgdb.h
@@ -298,7 +298,7 @@ extern bool kgdb_nmi_poll_knock(void);
#else
static inline int kgdb_register_nmi_console(void) { return 0; }
static inline int kgdb_unregister_nmi_console(void) { return 0; }
-static inline bool kgdb_nmi_poll_knock(void) { return 1; }
+static inline bool kgdb_nmi_poll_knock(void) { return true; }
#endif

extern int kgdb_register_io_module(struct kgdb_io *local_kgdb_io_ops);
--
2.21.1


2020-05-07 15:15:23

by Doug Anderson

[permalink] [raw]
Subject: Re: [PATCH] kgdb: Return true in kgdb_nmi_poll_knock()

Hi,

On Thu, May 7, 2020 at 4:07 AM Jason Yan <[email protected]> wrote:
>
> Fix the following coccicheck warning:
>
> include/linux/kgdb.h:301:54-55: WARNING: return of 0/1 in function
> 'kgdb_nmi_poll_knock' with return type bool
>
> Signed-off-by: Jason Yan <[email protected]>
> ---
> include/linux/kgdb.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Douglas Anderson <[email protected]>

2020-05-11 13:13:33

by Daniel Thompson

[permalink] [raw]
Subject: Re: [PATCH] kgdb: Return true in kgdb_nmi_poll_knock()

On Thu, May 07, 2020 at 07:06:49PM +0800, Jason Yan wrote:
> Fix the following coccicheck warning:
>
> include/linux/kgdb.h:301:54-55: WARNING: return of 0/1 in function
> 'kgdb_nmi_poll_knock' with return type bool
>
> Signed-off-by: Jason Yan <[email protected]>

Applied, thanks.


> ---
> include/linux/kgdb.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/kgdb.h b/include/linux/kgdb.h
> index b072aeb1fd78..042828aeb73d 100644
> --- a/include/linux/kgdb.h
> +++ b/include/linux/kgdb.h
> @@ -298,7 +298,7 @@ extern bool kgdb_nmi_poll_knock(void);
> #else
> static inline int kgdb_register_nmi_console(void) { return 0; }
> static inline int kgdb_unregister_nmi_console(void) { return 0; }
> -static inline bool kgdb_nmi_poll_knock(void) { return 1; }
> +static inline bool kgdb_nmi_poll_knock(void) { return true; }
> #endif
>
> extern int kgdb_register_io_module(struct kgdb_io *local_kgdb_io_ops);
> --
> 2.21.1
>