Hi,

On Thu, Jun 4, 2020 at 3:02 AM Sumit Garg <sumit.g...@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 <diand...@chromium.org>

-Doug


_______________________________________________
Kgdb-bugreport mailing list
Kgdb-bugreport@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kgdb-bugreport

Reply via email to