From: Dave Martin <Dave.Martin@arm.com>
To: Timur Tabi <timur@codeaurora.org>
Cc: Greg Kroah-Hartman <greg@kroah.com>,
Russell King <linux@arm.linux.org.uk>,
Linus Walleij <linus.walleij@linaro.org>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] serial: amba-pl011: fix incorrect integer size in pl011_fifo_to_tty()
Date: Fri, 16 Oct 2015 13:48:03 +0100 [thread overview]
Message-ID: <20151016124733.GA4801@e103592.cambridge.arm.com> (raw)
In-Reply-To: <1444249636-25661-1-git-send-email-timur@codeaurora.org>
On Wed, Oct 07, 2015 at 03:27:16PM -0500, Timur Tabi wrote:
> The UART_DUMMY_DR_RX status bit is equal to (1 << 16), so a u16 is too small
> to hold that value. The result is that UART_DUMMY_DR_RX is never passed
> to uart_insert_char(). This means that we're always accepting characters,
> even when CREAD (in termios) is not set.
>
> Signed-off-by: Timur Tabi <timur@codeaurora.org>
> ---
> drivers/tty/serial/amba-pl011.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
> index fd27e98..899a771 100644
> --- a/drivers/tty/serial/amba-pl011.c
> +++ b/drivers/tty/serial/amba-pl011.c
> @@ -191,8 +191,8 @@ struct uart_amba_port {
> */
> static int pl011_fifo_to_tty(struct uart_amba_port *uap)
> {
> - u16 status, ch;
> - unsigned int flag, max_count = 256;
> + u16 status;
> + unsigned int ch, flag, max_count = 256;
> int fifotaken = 0;
FWIW,
Reviewed-by: Dave Martin <Dave.Martin@arm.com>
I guess this tells us something about how often !CREAD is used...
Cheers
---Dave
next prev parent reply other threads:[~2015-10-16 12:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-07 20:27 Timur Tabi
2015-10-16 12:48 ` Dave Martin [this message]
2015-10-23 10:04 ` Linus Walleij
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=20151016124733.GA4801@e103592.cambridge.arm.com \
--to=dave.martin@arm.com \
--cc=greg@kroah.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=timur@codeaurora.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
all inboxes | Powered by JetHome®