From: Tobias Klauser <tklauser@distanz.ch>
To: Dan Carpenter <error27@gmail.com>,
linux-serial@vger.kernel.org, nios2-dev@sopc.et.ntust.edu.tw,
linux-kernel@vger.kernel.org
Subject: Re: [RESEND PATCH 2/2] serial: Add driver for the Altera UART
Date: Mon, 1 Mar 2010 09:04:02 +0100 [thread overview]
Message-ID: <20100301080402.GD32296@distanz.ch> (raw)
In-Reply-To: <20100226195022.GF8417@bicker>
On 2010-02-26 at 20:50:22 +0100, Dan Carpenter <error27@gmail.com> wrote:
> A couple smatch complaints.
>
> drivers/serial/altera_jtaguart.c
> 380 if (co->index >= 0 && co->index <= ALTERA_JTAGUART_MAXPORTS)
> 381 co->index = 0;
> 382 port = &altera_jtaguart_ports[co->index].port;
>
> This test seems backward. co->index == -1 would be a buffer underflow.
>
> drivers/serial/altera_uart.c
> 455 if ((co->index >= 0)
> 456 && (co->index <= CONFIG_SERIAL_ALTERA_UART_MAXPORTS))
> 457 co->index = 0;
> 458 port = &altera_uart_ports[co->index].port;
>
> Same here.
Yep, those look completely wrong. I'll post an updated patch (including
the other changes suggested by Alan and Peter) later on.
Thanks,
Tobias
next prev parent reply other threads:[~2010-03-01 8:04 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-25 14:35 [PATCH 1/2] serial: Add driver for the Altera JTAG UART Tobias Klauser
2010-02-25 14:35 ` [PATCH 2/2] serial: Add driver for the Altera UART Tobias Klauser
2010-02-25 14:47 ` [RESEND PATCH " Tobias Klauser
2010-02-26 19:50 ` Dan Carpenter
2010-03-01 8:04 ` Tobias Klauser [this message]
2010-02-25 15:26 ` [PATCH 1/2] serial: Add driver for the Altera JTAG UART Alan Cox
2010-02-26 9:04 ` Tobias Klauser
2010-02-26 11:27 ` Alan Cox
2010-02-25 16:45 ` Peter Korsgaard
2010-02-26 9:06 ` Tobias Klauser
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=20100301080402.GD32296@distanz.ch \
--to=tklauser@distanz.ch \
--cc=error27@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=nios2-dev@sopc.et.ntust.edu.tw \
/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