From: Greg KH <gregkh@linuxfoundation.org>
To: Moriis Ku <saumah@gmail.com>
Cc: linux-serial@vger.kernel.org
Subject: Re: Add support for SUNIX multi I/O board
Date: Mon, 26 Apr 2021 11:48:04 +0200 [thread overview]
Message-ID: <YIaMVMJXjRdW5GY1@kroah.com> (raw)
In-Reply-To: <20210426093828.10348-1-saumah@gmail.com>
On Mon, Apr 26, 2021 at 05:38:28PM +0800, Moriis Ku wrote:
> From: Morris Ku <saumah@gmail.com>
>
> Sunix SDC Multi I/O board are different to Timedia's.
>
> This patch adds proper support for Sunix SDC Multi I/O board.
>
> Signed-off-by: Morris Ku<saumah@gmail.com>
Can you make your subject line look like:
[PATCH] serial: 8250_pci: add support for...
to match up the other patches for this driver?
> ---
> tty/serial/8250/8250_pci.c | 36 +++++++++++++++++++++++++++++++++++-
> 1 file changed, 35 insertions(+), 1 deletion(-)
>
> diff --git a/tty/serial/8250/8250_pci.c b/tty/serial/8250/8250_pci.c
> index 8814ff38..5758a98b 100644
> --- a/tty/serial/8250/8250_pci.c
> +++ b/tty/serial/8250/8250_pci.c
> @@ -1802,6 +1802,25 @@ pci_sunix_setup(struct serial_private *priv,
> return setup_port(priv, port, bar, offset, 0);
> }
>
> +static int
> +pci_sunix_sdc_setup(struct serial_private *priv,
Move this to be all on one line please.
> + const struct pciserial_board *board,
> + struct uart_8250_port *port, int idx)
Line up with the "(" or checkpatch will complain.
> +{
> + int bar;
> + int offset;
> +
> + port->port.flags |= UPF_FIXED_TYPE;
> + port->port.type = PORT_SUNIX;
> +
> + if (idx < 4) {
> + bar = 1
> + offset = idx * board->uart_offset;
> + }
So if idx is > 4, bar is unknown? That feels like a huge bug :(
> +
> + return setup_port(priv, port, bar, offset, 0);
Same for offset, looks like it could be used uninitialized as well.
The compiler didn't complain about this?
thanks,
greg k-h
prev parent reply other threads:[~2021-04-26 9:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-26 9:38 Add support for SUNIX multi I/O board Moriis Ku
2021-04-26 9:48 ` Greg KH [this message]
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=YIaMVMJXjRdW5GY1@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=linux-serial@vger.kernel.org \
--cc=saumah@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox