Re: [PATCH v3 1/2] kdb: Get rid of redundant kdb_register_flags()

From: Steven Rostedt
Date: Thu May 13 2021 - 09:19:58 EST


On Thu, 13 May 2021 16:58:41 +0530
Sumit Garg <sumit.garg@xxxxxxxxxx> wrote:

> Commit e4f291b3f7bb ("kdb: Simplify kdb commands registration")
> allowed registration of pre-allocated kdb commands with pointer to
> struct kdbtab_t. Lets switch other users as well to register pre-
> allocated kdb commands via:
> - Changing prototype for kdb_register() to pass a pointer to struct
> kdbtab_t instead.
> - Embed kdbtab_t structure in defcmd_set rather than individual params.
> So while at it rename struct defcmd_set to struct kdb_macro_t as that
> sounds more appropriate given its purpose.
>
> With these changes kdb_register_flags() becomes redundant and hence
> removed. Also, since we have switched all users to register
> pre-allocated commands, "is_dynamic" flag in struct kdbtab_t becomes
> redundant and hence removed as well.
>
> Signed-off-by: Sumit Garg <sumit.garg@xxxxxxxxxx>
> ---
> include/linux/kdb.h | 27 +++--
> kernel/debug/kdb/kdb_main.c | 206 +++++++++++----------------------
> kernel/debug/kdb/kdb_private.h | 13 ---
> kernel/trace/trace_kdb.c | 12 +-

For the tracing directory.

Acked-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx>

-- Steve

> samples/kdb/kdb_hello.c | 20 ++--
> 5 files changed, 104 insertions(+), 174 deletions(-)