linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Johan Hovold <johan@kernel.org>
Cc: linux-usb@vger.kernel.org
Subject: Re: [PATCH] USB: serial: console: add support for enabling flow control
Date: Thu, 2 Jul 2020 09:38:28 +0200	[thread overview]
Message-ID: <20200702073828.GF1073011@kroah.com> (raw)
In-Reply-To: <20200701173722.4536-1-johan@kernel.org>

On Wed, Jul 01, 2020 at 07:37:22PM +0200, Johan Hovold wrote:
> Add support for enabling hardware flow control using the 'r' command
> line option.
> 
> This also avoids a W=1 (-Wunused-but-set-variable) warning.
> 
> Signed-off-by: Johan Hovold <johan@kernel.org>
> ---
> 
> Missed this one at first... The white space change is done on purpose to
> remove a stray tab.
> 
> Johan
> 
> 
>  drivers/usb/serial/console.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/serial/console.c b/drivers/usb/serial/console.c
> index 7d289302ff6c..b97aa40ca4d1 100644
> --- a/drivers/usb/serial/console.c
> +++ b/drivers/usb/serial/console.c
> @@ -79,7 +79,7 @@ static int usb_console_setup(struct console *co, char *options)
>  		if (*s)
>  			doflow = (*s++ == 'r');
>  	}
> -	
> +
>  	/* Sane default */
>  	if (baud == 0)
>  		baud = 9600;
> @@ -102,6 +102,9 @@ static int usb_console_setup(struct console *co, char *options)
>  		break;
>  	}
>  
> +	if (doflow)
> +		cflag |= CRTSCTS;
> +
>  	/*
>  	 * no need to check the index here: if the index is wrong, console
>  	 * code won't call us
> -- 
> 2.26.2
> 

Nice fix!

And I think one of the first real "bugfixes" that have come out of the
recent W=1 work...

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

  reply	other threads:[~2020-07-02  7:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-01 17:37 [PATCH] USB: serial: console: add support for enabling flow control Johan Hovold
2020-07-02  7:38 ` Greg KH [this message]
2020-07-02  8:44   ` Johan Hovold

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=20200702073828.GF1073011@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=johan@kernel.org \
    --cc=linux-usb@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).