Skip to contentSkip to conversation

kgdb: Return true in kgdb_nmi_poll_knock()

PATCH Applied Jason Yan 3 participants 3 messages May 7, 2020 – May 11, 2020 KGDB / KDB /debug_core

lore
Share & tools
lore

Jason Yan

author
#0 lore raw

PATCH 1/1 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

---
 include/linux/kgdb.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/kgdb.h +1 -1
index b072aeb1fd78..042828aeb73d 100644
@@ -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);
Signature · 1 line
2.21.1
#2 lore raw
In reply to Jason Yan
Quoted 6 lines · Jason Yan

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

Applied, thanks.

Quoted 20 lines
---
 include/linux/kgdb.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/kgdb.h +1 -1
index b072aeb1fd78..042828aeb73d 100644
@@ -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);
Signature · 1 line
2.21.1