From: Daniel Thompson <daniel.thompson@linaro.org>
To: Doug Anderson <dianders@chromium.org>
Cc: Jason Wessel <jason.wessel@windriver.com>,
kgdb-bugreport@lists.sourceforge.net,
LKML <linux-kernel@vger.kernel.org>,
Patch Tracking <patches@linaro.org>
Subject: Re: [PATCH v3 3/5] kdb: Remove special case logic from kdb_read()
Date: Thu, 17 Oct 2019 10:14:01 +0100 [thread overview]
Message-ID: <20191017091401.76sqpcymegxur4kq@holly.lan> (raw)
In-Reply-To: <CAD=FV=W44zXesz8b8Z05_k7JjPW8D9z8fGT3GiGFSmSLw85zMQ@mail.gmail.com>
On Wed, Oct 16, 2019 at 09:10:22PM -0700, Doug Anderson wrote:
> Hi,
>
> On Mon, Oct 14, 2019 at 8:46 AM Daniel Thompson
> <daniel.thompson@linaro.org> wrote:
> >
> > @@ -91,12 +92,17 @@ kdb_bt1(struct task_struct *p, unsigned long mask,
> > kdb_ps1(p);
> > kdb_show_stack(p, NULL);
> > if (btaprompt) {
> > - kdb_getstr(buffer, sizeof(buffer),
> > - "Enter <q> to end, <cr> to continue:");
> > - if (buffer[0] == 'q') {
> > - kdb_printf("\n");
> > + kdb_printf("Enter <q> to end, <cr> or <space> to continue:");
> > + ch = kdb_getchar();
> > + while (!strchr("\r\n q", ch))
> > + ch = kdb_getchar();
>
> nit: above 3 lines would be better with "do while", AKA:
>
> do {
> ch = kdb_getchar();
> } while (!strchr("\r\n q", ch));
Doh! Too much python...
>
>
> > @@ -50,14 +50,14 @@ static int kgdb_transition_check(char *buffer)
> > }
> >
> > /*
> > - * kdb_read_handle_escape
> > + * kdb_handle_escape
>
> Optional nit: while you're touching this comment, you could make it
> kerneldoc complaint.
>
>
> > @@ -152,7 +158,7 @@ static int kdb_read_get_key(char *buffer, size_t bufsize)
> > return '\e';
> >
> > *ped++ = key;
> > - key = kdb_read_handle_escape(escape_data,
> > + key = kdb_handle_escape(escape_data,
> > ped - escape_data);
>
> nit: indentation no longer lines up for the "ped - escape_data" line.
>
> Nothing here is terribly important, thus:
>
> Reviewed-by: Douglas Anderson <dianders@chromium.org>
Thanks. I'll pick the nits (although I might leave v4 out for review
for a relatively short time before applying it ;-) ).
Daniel.
next prev parent reply other threads:[~2019-10-17 9:14 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-14 15:46 [PATCH v3 0/5] kdb: Cleanup code to read user input and handle escape sequences Daniel Thompson
2019-10-14 15:46 ` [PATCH v3 1/5] kdb: Tidy up code to " Daniel Thompson
2019-10-14 15:46 ` [PATCH v3 2/5] kdb: Simplify code to fetch characters from console Daniel Thompson
2019-10-14 15:46 ` [PATCH v3 3/5] kdb: Remove special case logic from kdb_read() Daniel Thompson
2019-10-17 4:10 ` Doug Anderson
2019-10-17 9:14 ` Daniel Thompson [this message]
2019-10-14 15:46 ` [PATCH v3 4/5] kdb: Improve handling of characters from different input sources Daniel Thompson
2019-10-17 4:11 ` Doug Anderson
2019-10-14 15:46 ` [PATCH v3 5/5] kdb: Tweak escape handling for vi users Daniel Thompson
2019-10-17 4:12 ` Doug Anderson
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=20191017091401.76sqpcymegxur4kq@holly.lan \
--to=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=patches@linaro.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).