On Fri, Jan 24, 2020 at 06:11:32PM +0200, Andy Shevchenko wrote: > Replace open coded single-linked list iteration loop with for_each_console() > helper in use. > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> Acked-by: Daniel Thompson <daniel.thompson@xxxxxxxxxx> > --- > drivers/tty/serial/kgdboc.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/tty/serial/kgdboc.c b/drivers/tty/serial/kgdboc.c > index c7d51b51898f..c9f94fa82be4 100644 > --- a/drivers/tty/serial/kgdboc.c > +++ b/drivers/tty/serial/kgdboc.c > @@ -169,15 +169,13 @@ static int configure_kgdboc(void) > if (!p) > goto noconfig; > > - cons = console_drivers; > - while (cons) { > + for_each_console(cons) { > int idx; > if (cons->device && cons->device(cons, &idx) == p && > idx == tty_line) { > kgdboc_io_ops.is_console = 1; > break; > } > - cons = cons->next; > } > > kgdb_tty_driver = p; > -- > 2.24.1 >