linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Thompson <daniel.thompson@linaro.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Jason Wessel <jason.wessel@windriver.com>,
	kgdb-bugreport@lists.sourceforge.net,
	Douglas Anderson <dianders@chromium.org>,
	linux-serial@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH v1] kgdboc: Use for_each_console() helper
Date: Fri, 31 Jan 2020 17:01:01 +0000	[thread overview]
Message-ID: <20200131170101.zjhu2xilrpm6wotz@holly.lan> (raw)
In-Reply-To: <20200124161132.65519-1-andriy.shevchenko@linux.intel.com>

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

Acked-by: Daniel Thompson <daniel.thompson@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
> 

      reply	other threads:[~2020-01-31 17:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-24 16:11 [PATCH v1] kgdboc: Use for_each_console() helper Andy Shevchenko
2020-01-31 17:01 ` Daniel Thompson [this message]

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=20200131170101.zjhu2xilrpm6wotz@holly.lan \
    --to=daniel.thompson@linaro.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=dianders@chromium.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jason.wessel@windriver.com \
    --cc=kgdb-bugreport@lists.sourceforge.net \
    --cc=linux-serial@vger.kernel.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).