lkml.org 
[lkml]   [2021]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v4 3/4] kdb: Simplify kdb_defcmd macro logic
On Sat, 10 Jul 2021 at 03:07, Doug Anderson <dianders@chromium.org> wrote:
>
> Hi,
>
> On Fri, Jul 9, 2021 at 3:43 AM Sumit Garg <sumit.garg@linaro.org> wrote:
> >
> > Switch to use a linked list instead of dynamic array which makes
> > allocation of kdb macro and traversing the kdb macro commands list
> > simpler.
> >
> > Suggested-by: Daniel Thompson <daniel.thompson@linaro.org>
> > Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
> > ---
> > kernel/debug/kdb/kdb_main.c | 107 +++++++++++++++++++-----------------
> > 1 file changed, 58 insertions(+), 49 deletions(-)
> >
> > diff --git a/kernel/debug/kdb/kdb_main.c b/kernel/debug/kdb/kdb_main.c
> > index 6d9ff4048e7d..371983c03223 100644
> > --- a/kernel/debug/kdb/kdb_main.c
> > +++ b/kernel/debug/kdb/kdb_main.c
> > @@ -654,13 +654,16 @@ static void kdb_cmderror(int diag)
> > * zero for success, a kdb diagnostic if error
> > */
> > struct kdb_macro_t {
> > - int count;
> > - bool usable;
> > - kdbtab_t cmd;
> > - char **command;
> > + kdbtab_t cmd; /* Macro command */
> > + struct list_head statements; /* Associated statement list */
> > };
> > +
> > +struct kdb_macro_statement_t {
> > + char *statement; /* Statement name */
>
> This is still not really the name. This is the actual statement,
> right? Like it might contain "ftdump -1", right? It seems really weird
> to call that the "name". You could drop the word "name", or change
> this to "Statement text", or just totally drop the comment.
>

Let me use "Statement text" instead.

> Other than that this looks good to me.
>
> Reviewed-by: Douglas Anderson <dianders@chromium.org>

Thanks,
-Sumit

\
 
 \ /
  Last update: 2021-07-12 09:52    [W:0.042 / U:1.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site