All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kdb: move kdb_send_sig() declaration to a better header file
@ 2023-06-30 20:12 Daniel Thompson
  2023-06-30 20:56 ` Doug Anderson
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Thompson @ 2023-06-30 20:12 UTC (permalink / raw)
  To: Jason Wessel, Douglas Anderson
  Cc: Daniel Thompson, Kees Cook, kgdb-bugreport, linux-kernel, Arnd Bergmann

kdb_send_sig() is defined in the signal code and called from kdb,
but the declaration is part of the kdb internal code.
Move the declaration to the shared header to avoid the warning:

kernel/signal.c:4789:6: error: no previous prototype for 'kdb_send_sig' [-Werror=missing-prototypes]

Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
---
 include/linux/kdb.h            | 2 ++
 kernel/debug/kdb/kdb_private.h | 1 -
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/linux/kdb.h b/include/linux/kdb.h
index 07dfb6a20a1c4..f6c2ddb16b958 100644
--- a/include/linux/kdb.h
+++ b/include/linux/kdb.h
@@ -196,6 +196,8 @@ int kdb_process_cpu(const struct task_struct *p)
 	return cpu;
 }

+extern void kdb_send_sig(struct task_struct *p, int sig);
+
 #ifdef CONFIG_KALLSYMS
 extern const char *kdb_walk_kallsyms(loff_t *pos);
 #else /* ! CONFIG_KALLSYMS */
diff --git a/kernel/debug/kdb/kdb_private.h b/kernel/debug/kdb/kdb_private.h
index 1f8c519a5f81c..548fd4059bf9b 100644
--- a/kernel/debug/kdb/kdb_private.h
+++ b/kernel/debug/kdb/kdb_private.h
@@ -194,7 +194,6 @@ extern char kdb_task_state_char (const struct task_struct *);
 extern bool kdb_task_state(const struct task_struct *p, const char *mask);
 extern void kdb_ps_suppressed(void);
 extern void kdb_ps1(const struct task_struct *p);
-extern void kdb_send_sig(struct task_struct *p, int sig);
 extern char kdb_getchar(void);
 extern char *kdb_getstr(char *, size_t, const char *);
 extern void kdb_gdb_state_pass(char *buf);

base-commit: 858fd168a95c5b9669aac8db6c14a9aeab446375
--
2.39.2


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

* Re: [PATCH] kdb: move kdb_send_sig() declaration to a better header file
  2023-06-30 20:12 [PATCH] kdb: move kdb_send_sig() declaration to a better header file Daniel Thompson
@ 2023-06-30 20:56 ` Doug Anderson
  0 siblings, 0 replies; 2+ messages in thread
From: Doug Anderson @ 2023-06-30 20:56 UTC (permalink / raw)
  To: Daniel Thompson
  Cc: Jason Wessel, Kees Cook, kgdb-bugreport, linux-kernel, Arnd Bergmann

Hi,

On Fri, Jun 30, 2023 at 1:12 PM Daniel Thompson
<daniel.thompson@linaro.org> wrote:
>
> kdb_send_sig() is defined in the signal code and called from kdb,
> but the declaration is part of the kdb internal code.
> Move the declaration to the shared header to avoid the warning:
>
> kernel/signal.c:4789:6: error: no previous prototype for 'kdb_send_sig' [-Werror=missing-prototypes]
>
> Reported-by: Arnd Bergmann <arnd@arndb.de>

FWIW: these days, I think checkpatch yells at you for a bare
"Reported-by" like above. It ideally wants a "Closes" tag to follow
immediately with a link to the report, or in the very least a "Link"
tag if this doesn't fully address the issue.

> Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>

Reviewed-by: Douglas Anderson <dianders@chromium.org>

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

end of thread, other threads:[~2023-06-30 20:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-30 20:12 [PATCH] kdb: move kdb_send_sig() declaration to a better header file Daniel Thompson
2023-06-30 20:56 ` Doug Anderson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.