From: Okash Khawaja <okash.khawaja@gmail.com>
To: Alan Cox <gnomes@lxorguk.ukuu.org.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Samuel Thibault <samuel.thibault@ens-lyon.org>,
linux-kernel@vger.kernel.org, William Hubbs <w.d.hubbs@gmail.com>,
Chris Brannon <chris@the-brannons.com>,
Kirk Reiser <kirk@reisers.ca>,
speakup@linux-speakup.org, devel@driverdev.osuosl.org,
John Covici <covici@ccs.covici.com>
Subject: Re: [patch 1/1] staging: speakup: flush tty buffers and ensure hardware flow control
Date: Thu, 11 May 2017 09:29:14 +0100 [thread overview]
Message-ID: <20170511082914.GA599@sanghar> (raw)
In-Reply-To: <20170510204151.43986689@alans-desktop>
Hi Alan,
On Wed, May 10, 2017 at 08:41:51PM +0100, Alan Cox wrote:
> > + if (!(tmp_termios.c_cflag & CRTSCTS)) {
> > + tmp_termios.c_cflag |= CRTSCTS;
> > + ret = tty_set_termios(tty, &tmp_termios);
> > + if (ret)
> > + pr_warn("speakup: Failed to set hardware flow control\n");
>
> You should check the tty c_cflag after the call rather than rely on an
> error code. Strictly speaking tty_set_termios should error if no tty bits
> are changed by the request but it never has on Linux. Instead check the
> tty gave you the result you wanted.
Thanks. I will replace the check for return value with check for c_cflag.
May be we should fix this in tty_set_termios?
next prev parent reply other threads:[~2017-05-11 8:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-09 12:40 [patch 0/1] staging: speakup: flush tty buffers and ensure hardware flow control okash.khawaja
2017-05-09 12:40 ` [patch 1/1] " okash.khawaja
2017-05-10 19:41 ` Alan Cox
2017-05-11 8:29 ` Okash Khawaja [this message]
2017-05-11 13:33 ` Alan Cox
2017-05-12 19:35 ` Okash Khawaja
2017-05-12 20:18 ` Alan Cox
2017-05-12 19:43 ` [patch v2 " Okash Khawaja
2017-05-15 10:45 ` Greg Kroah-Hartman
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=20170511082914.GA599@sanghar \
--to=okash.khawaja@gmail.com \
--cc=chris@the-brannons.com \
--cc=covici@ccs.covici.com \
--cc=devel@driverdev.osuosl.org \
--cc=gnomes@lxorguk.ukuu.org.uk \
--cc=gregkh@linuxfoundation.org \
--cc=kirk@reisers.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=samuel.thibault@ens-lyon.org \
--cc=speakup@linux-speakup.org \
--cc=w.d.hubbs@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.