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.shevche...@linux.intel.com>

Acked-by: Daniel Thompson <daniel.thomp...@linaro.org>

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


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

Reply via email to