Skip to contentSkip to conversation

kdb: include kdb_private.h for function prototypes

PATCH In review Arnd Bergmann 2 participants 2 messages May 17, 2023 KGDB / KDB /debug_core

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kdb: include kdb_private.h for function prototypes

From: Arnd Bergmann <[email protected]>

The kdb_kbd_cleanup_state() is called from another file through the kdb_private.h file, but that is not included before the definition, causing a W=1 warning:

kernel/debug/kdb/kdb_keyboard.c:198:6: error: no previous prototype for 'kdb_kbd_cleanup_state' [-Werror=missing-prototypes]

---
 kernel/debug/kdb/kdb_keyboard.c | 2 ++
 1 file changed, 2 insertions(+)
kernel/debug/kdb/kdb_keyboard.c +2 -0
index f87c750d3eb3..3c2987f46f6e 100644
@@ -13,6 +13,8 @@
 #include <linux/ctype.h>
 #include <linux/io.h>
 
+#include "kdb_private.h"
+
 /* Keyboard Controller Registers on normal PCs. */
 
 #define KBD_STATUS_REG		0x64	/* Status register (R) */
Signature · 1 line
2.39.2
reviewer Reviewed-by on v1 1/1
#1 lore raw

Hi,

Quoted 7 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The kdb_kbd_cleanup_state() is called from another file through the kdb_private.h file, but that is not included before the definition, causing a W=1 warning:

Quoted 6 lines

kernel/debug/kdb/kdb_keyboard.c:198:6: error: no previous prototype for 'kdb_kbd_cleanup_state' [-Werror=missing-prototypes]

---
 kernel/debug/kdb/kdb_keyboard.c | 2 ++
 1 file changed, 2 insertions(+)