Messages in this thread | | | Date | Thu, 17 Oct 2019 10:14:01 +0100 | From | Daniel Thompson <> | Subject | Re: [PATCH v3 3/5] kdb: Remove special case logic from kdb_read() |
| |
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.
| |