lkml.org 
[lkml]   [2019]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
SubjectRe: [PATCH v3 3/5] kdb: Remove special case logic from kdb_read()
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));


> @@ -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>

\
 
 \ /
  Last update: 2019-10-17 06:11    [W:0.074 / U:0.632 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site