From: Sumit Garg <sumit.garg@linaro.org>
To: Doug Anderson <dianders@chromium.org>
Cc: kgdb-bugreport@lists.sourceforge.net,
Daniel Thompson <daniel.thompson@linaro.org>,
Jason Wessel <jason.wessel@windriver.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ingo Molnar <mingo@redhat.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v4 3/4] kdb: Simplify kdb_defcmd macro logic
Date: Mon, 12 Jul 2021 12:46:15 +0530 [thread overview]
Message-ID: <CAFA6WYORwft8kMt+7rJ=AKrVY0THDsLCzCtm7HS0vZjh9L-HPQ@mail.gmail.com> (raw)
In-Reply-To: <CAD=FV=XHPCXSAmgf62K7+5LLbrz--BenQk5AyDozscr62qjbJg@mail.gmail.com>
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
next prev parent reply other threads:[~2021-07-12 7:52 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-09 10:43 [PATCH v4 0/4] kdb code refactoring Sumit Garg
2021-07-09 10:43 ` [PATCH v4 1/4] kdb: Rename struct defcmd_set to struct kdb_macro_t Sumit Garg
2021-07-09 21:36 ` Doug Anderson
2021-07-12 7:13 ` Sumit Garg
2021-07-12 13:40 ` Doug Anderson
2021-07-09 10:43 ` [PATCH v4 2/4] kdb: Get rid of redundant kdb_register_flags() Sumit Garg
2021-07-09 21:37 ` Doug Anderson
2021-07-12 7:14 ` Sumit Garg
2021-07-09 10:43 ` [PATCH v4 3/4] kdb: Simplify kdb_defcmd macro logic Sumit Garg
2021-07-09 21:37 ` Doug Anderson
2021-07-12 7:16 ` Sumit Garg [this message]
2021-07-09 10:43 ` [PATCH v4 4/4] kdb: Rename members of struct kdbtab_t Sumit Garg
2021-07-09 21:37 ` Doug Anderson
2021-07-12 7:17 ` Sumit Garg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAFA6WYORwft8kMt+7rJ=AKrVY0THDsLCzCtm7HS0vZjh9L-HPQ@mail.gmail.com' \
--to=sumit.garg@linaro.org \
--cc=daniel.thompson@linaro.org \
--cc=dianders@chromium.org \
--cc=jason.wessel@windriver.com \
--cc=kgdb-bugreport@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).