From: Doug Anderson <dianders@chromium.org>
To: Sumit Garg <sumit.garg@linaro.org>
Cc: Daniel Thompson <daniel.thompson@linaro.org>,
kgdb-bugreport@lists.sourceforge.net,
Jason Wessel <jason.wessel@windriver.com>,
Petr Mladek <pmladek@suse.com>,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jslaby@suse.com>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v6 4/4] kdb: Switch to use safer dbg_io_ops over console APIs
Date: Thu, 4 Jun 2020 14:12:22 -0700 [thread overview]
Message-ID: <CAD=FV=URj6UiZgH_g3twcYgv=USGr7YUV5SkW3J-WYR1vs+MDw@mail.gmail.com> (raw)
In-Reply-To: <1591264879-25920-5-git-send-email-sumit.garg@linaro.org>
Hi,
On Thu, Jun 4, 2020 at 3:02 AM Sumit Garg <sumit.garg@linaro.org> wrote:
>
> @@ -433,7 +432,8 @@ static int kgdboc_earlycon_get_char(void)
> {
> char c;
>
> - if (!earlycon->read(earlycon, &c, 1))
> + if (!kgdboc_earlycon_io_ops.cons->read(kgdboc_earlycon_io_ops.cons,
> + &c, 1))
> return NO_POLL_CHAR;
>
> return c;
> @@ -441,7 +441,8 @@ static int kgdboc_earlycon_get_char(void)
>
> static void kgdboc_earlycon_put_char(u8 chr)
> {
> - earlycon->write(earlycon, &chr, 1);
> + kgdboc_earlycon_io_ops.cons->write(kgdboc_earlycon_io_ops.cons, &chr,
> + 1);
> }
The get_char / put_char functions are pretty unwieldy now. If it were
me I would have done:
struct console *con = kgdboc_earlycon_io_ops.cons;
...and then used it so the lines didn't wrap in such a terrible way. ;-)
I'm not sure if I'd spin just for that, though.
Reviewed-by: Douglas Anderson <dianders@chromium.org>
-Doug
next prev parent reply other threads:[~2020-06-04 21:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-04 10:01 [PATCH v6 0/4] kdb: Improve console handling Sumit Garg
2020-06-04 10:01 ` [PATCH v6 1/4] kdb: Re-factor kdb_printf() message write code Sumit Garg
2020-06-04 10:01 ` [PATCH v6 2/4] kdb: Check status of console prior to invoking handlers Sumit Garg
2020-06-04 10:01 ` [PATCH v6 3/4] kdb: Make kdb_printf() console handling more robust Sumit Garg
2020-06-04 10:01 ` [PATCH v6 4/4] kdb: Switch to use safer dbg_io_ops over console APIs Sumit Garg
2020-06-04 21:12 ` Doug Anderson [this message]
2020-06-05 9:53 ` Petr Mladek
2020-06-26 12:13 ` Daniel Thompson
2020-06-26 14:19 ` Greg KH
2020-06-05 3:57 ` [PATCH v6 0/4] kdb: Improve console handling Sergey Senozhatsky
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='CAD=FV=URj6UiZgH_g3twcYgv=USGr7YUV5SkW3J-WYR1vs+MDw@mail.gmail.com' \
--to=dianders@chromium.org \
--cc=daniel.thompson@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=jason.wessel@windriver.com \
--cc=jslaby@suse.com \
--cc=kgdb-bugreport@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=pmladek@suse.com \
--cc=sergey.senozhatsky@gmail.com \
--cc=sumit.garg@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).