2023-05-17 12:57:41

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH] 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]

Signed-off-by: Arnd Bergmann <[email protected]>
---
kernel/debug/kdb/kdb_keyboard.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/kernel/debug/kdb/kdb_keyboard.c b/kernel/debug/kdb/kdb_keyboard.c
index f87c750d3eb3..3c2987f46f6e 100644
--- a/kernel/debug/kdb/kdb_keyboard.c
+++ b/kernel/debug/kdb/kdb_keyboard.c
@@ -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) */
--
2.39.2



2023-05-17 15:46:40

by Doug Anderson

[permalink] [raw]
Subject: Re: [PATCH] kdb: include kdb_private.h for function prototypes

Hi,

On Wed, May 17, 2023 at 5:48 AM Arnd Bergmann <[email protected]> wrote:
>
> 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]
>
> Signed-off-by: Arnd Bergmann <[email protected]>
> ---
> kernel/debug/kdb/kdb_keyboard.c | 2 ++
> 1 file changed, 2 insertions(+)

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