Commit e868f0a3 authored by Sumit Garg's avatar Sumit Garg Committed by Daniel Thompson

kdb: Rename members of struct kdbtab_t

Remove redundant prefix "cmd_" from name of members in struct kdbtab_t
for better readibility.
Suggested-by: default avatarDoug Anderson <dianders@chromium.org>
Signed-off-by: default avatarSumit Garg <sumit.garg@linaro.org>
Reviewed-by: default avatarDouglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20210712134620.276667-5-sumit.garg@linaro.orgSigned-off-by: default avatarDaniel Thompson <daniel.thompson@linaro.org>
parent 9a5db530
...@@ -68,12 +68,12 @@ typedef int (*kdb_func_t)(int, const char **); ...@@ -68,12 +68,12 @@ typedef int (*kdb_func_t)(int, const char **);
/* The KDB shell command table */ /* The KDB shell command table */
typedef struct _kdbtab { typedef struct _kdbtab {
char *cmd_name; /* Command name */ char *name; /* Command name */
kdb_func_t cmd_func; /* Function to execute command */ kdb_func_t func; /* Function to execute command */
char *cmd_usage; /* Usage String for this command */ char *usage; /* Usage String for this command */
char *cmd_help; /* Help message for this command */ char *help; /* Help message for this command */
short cmd_minlen; /* Minimum legal # cmd chars required */ short minlen; /* Minimum legal # cmd chars required */
kdb_cmdflags_t cmd_flags; /* Command behaviour flags */ kdb_cmdflags_t flags; /* Command behaviour flags */
struct list_head list_node; /* Command list */ struct list_head list_node; /* Command list */
} kdbtab_t; } kdbtab_t;
......
...@@ -523,51 +523,51 @@ static int kdb_ss(int argc, const char **argv) ...@@ -523,51 +523,51 @@ static int kdb_ss(int argc, const char **argv)
} }
static kdbtab_t bptab[] = { static kdbtab_t bptab[] = {
{ .cmd_name = "bp", { .name = "bp",
.cmd_func = kdb_bp, .func = kdb_bp,
.cmd_usage = "[<vaddr>]", .usage = "[<vaddr>]",
.cmd_help = "Set/Display breakpoints", .help = "Set/Display breakpoints",
.cmd_flags = KDB_ENABLE_FLOW_CTRL | KDB_REPEAT_NO_ARGS, .flags = KDB_ENABLE_FLOW_CTRL | KDB_REPEAT_NO_ARGS,
}, },
{ .cmd_name = "bl", { .name = "bl",
.cmd_func = kdb_bp, .func = kdb_bp,
.cmd_usage = "[<vaddr>]", .usage = "[<vaddr>]",
.cmd_help = "Display breakpoints", .help = "Display breakpoints",
.cmd_flags = KDB_ENABLE_FLOW_CTRL | KDB_REPEAT_NO_ARGS, .flags = KDB_ENABLE_FLOW_CTRL | KDB_REPEAT_NO_ARGS,
}, },
{ .cmd_name = "bc", { .name = "bc",
.cmd_func = kdb_bc, .func = kdb_bc,
.cmd_usage = "<bpnum>", .usage = "<bpnum>",
.cmd_help = "Clear Breakpoint", .help = "Clear Breakpoint",
.cmd_flags = KDB_ENABLE_FLOW_CTRL, .flags = KDB_ENABLE_FLOW_CTRL,
}, },
{ .cmd_name = "be", { .name = "be",
.cmd_func = kdb_bc, .func = kdb_bc,
.cmd_usage = "<bpnum>", .usage = "<bpnum>",
.cmd_help = "Enable Breakpoint", .help = "Enable Breakpoint",
.cmd_flags = KDB_ENABLE_FLOW_CTRL, .flags = KDB_ENABLE_FLOW_CTRL,
}, },
{ .cmd_name = "bd", { .name = "bd",
.cmd_func = kdb_bc, .func = kdb_bc,
.cmd_usage = "<bpnum>", .usage = "<bpnum>",
.cmd_help = "Disable Breakpoint", .help = "Disable Breakpoint",
.cmd_flags = KDB_ENABLE_FLOW_CTRL, .flags = KDB_ENABLE_FLOW_CTRL,
}, },
{ .cmd_name = "ss", { .name = "ss",
.cmd_func = kdb_ss, .func = kdb_ss,
.cmd_usage = "", .usage = "",
.cmd_help = "Single Step", .help = "Single Step",
.cmd_minlen = 1, .minlen = 1,
.cmd_flags = KDB_ENABLE_FLOW_CTRL | KDB_REPEAT_NO_ARGS, .flags = KDB_ENABLE_FLOW_CTRL | KDB_REPEAT_NO_ARGS,
}, },
}; };
static kdbtab_t bphcmd = { static kdbtab_t bphcmd = {
.cmd_name = "bph", .name = "bph",
.cmd_func = kdb_bp, .func = kdb_bp,
.cmd_usage = "[<vaddr>]", .usage = "[<vaddr>]",
.cmd_help = "[datar [length]|dataw [length]] Set hw brk", .help = "[datar [length]|dataw [length]] Set hw brk",
.cmd_flags = KDB_ENABLE_FLOW_CTRL | KDB_REPEAT_NO_ARGS, .flags = KDB_ENABLE_FLOW_CTRL | KDB_REPEAT_NO_ARGS,
}; };
/* Initialize the breakpoint table and register breakpoint commands. */ /* Initialize the breakpoint table and register breakpoint commands. */
......
This diff is collapsed.
...@@ -148,11 +148,11 @@ static int kdb_ftdump(int argc, const char **argv) ...@@ -148,11 +148,11 @@ static int kdb_ftdump(int argc, const char **argv)
} }
static kdbtab_t ftdump_cmd = { static kdbtab_t ftdump_cmd = {
.cmd_name = "ftdump", .name = "ftdump",
.cmd_func = kdb_ftdump, .func = kdb_ftdump,
.cmd_usage = "[skip_#entries] [cpu]", .usage = "[skip_#entries] [cpu]",
.cmd_help = "Dump ftrace log; -skip dumps last #entries", .help = "Dump ftrace log; -skip dumps last #entries",
.cmd_flags = KDB_ENABLE_ALWAYS_SAFE, .flags = KDB_ENABLE_ALWAYS_SAFE,
}; };
static __init int kdb_ftrace_register(void) static __init int kdb_ftrace_register(void)
......
...@@ -29,10 +29,10 @@ static int kdb_hello_cmd(int argc, const char **argv) ...@@ -29,10 +29,10 @@ static int kdb_hello_cmd(int argc, const char **argv)
} }
static kdbtab_t hello_cmd = { static kdbtab_t hello_cmd = {
.cmd_name = "hello", .name = "hello",
.cmd_func = kdb_hello_cmd, .func = kdb_hello_cmd,
.cmd_usage = "[string]", .usage = "[string]",
.cmd_help = "Say Hello World or Hello [string]", .help = "Say Hello World or Hello [string]",
}; };
static int __init kdb_hello_cmd_init(void) static int __init kdb_hello_cmd_init(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment