[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFA6WYORwft8kMt+7rJ=AKrVY0THDsLCzCtm7HS0vZjh9L-HPQ@mail.gmail.com>
Date: Mon, 12 Jul 2021 12:46:15 +0530
From: Sumit Garg <sumit.garg@...aro.org>
To: Doug Anderson <dianders@...omium.org>
Cc: kgdb-bugreport@...ts.sourceforge.net,
Daniel Thompson <daniel.thompson@...aro.org>,
Jason Wessel <jason.wessel@...driver.com>,
Steven Rostedt <rostedt@...dmis.org>,
Ingo Molnar <mingo@...hat.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4 3/4] kdb: Simplify kdb_defcmd macro logic
On Sat, 10 Jul 2021 at 03:07, Doug Anderson <dianders@...omium.org> wrote:
>
> Hi,
>
> On Fri, Jul 9, 2021 at 3:43 AM Sumit Garg <sumit.garg@...aro.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@...aro.org>
> > Signed-off-by: Sumit Garg <sumit.garg@...aro.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@...omium.org>
Thanks,
-Sumit
Powered by blists - more mailing lists