From: Alan Cox <gnomes@lxorguk.ukuu.org.uk>
To: okash.khawaja@gmail.com
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: Wed, 10 May 2017 20:41:51 +0100 [thread overview]
Message-ID: <20170510204151.43986689@alans-desktop> (raw)
In-Reply-To: <20170509124238.139472887@gmail.com>
> + 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.
Alan
next prev parent reply other threads:[~2017-05-10 19:42 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 [this message]
2017-05-11 8:29 ` Okash Khawaja
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=20170510204151.43986689@alans-desktop \
--to=gnomes@lxorguk.ukuu.org.uk \
--cc=chris@the-brannons.com \
--cc=covici@ccs.covici.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=kirk@reisers.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=okash.khawaja@gmail.com \
--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.