From: "Alexander Shiyan" <shc_work@mail.ru>
To: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
Cc: linux-serial@vger.kernel.org, "Jiri Slaby" <jslaby@suse.cz>
Subject: Re[2]: [PATCH v2] serial: sccnxp: Improve verify_port
Date: Tue, 14 May 2013 20:30:47 +0400 [thread overview]
Message-ID: <1368549047.374871060@f159.mail.ru> (raw)
In-Reply-To: <20130514160931.GA2695@kroah.com>
> On Tue, May 14, 2013 at 07:59:11PM +0400, Alexander Shiyan wrote:
> > The patch improves verify_port procedure by comparing the type of
> > port and IRQ numbers simultaneously. This can be important in the
> > case of multiple drivers SCCNXP in the system that are different IRQs.
>
> So this fixes a bug? Really?
Only in theory.
> > Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
> > ---
> > drivers/tty/serial/sccnxp.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/tty/serial/sccnxp.c b/drivers/tty/serial/sccnxp.c
> > index c773041..92e6195 100644
> > --- a/drivers/tty/serial/sccnxp.c
> > +++ b/drivers/tty/serial/sccnxp.c
> > @@ -713,8 +713,8 @@ static void sccnxp_config_port(struct uart_port *port, int flags)
> >
> > static int sccnxp_verify_port(struct uart_port *port, struct serial_struct *s)
> > {
> > - if ((s->type == PORT_UNKNOWN) || (s->type == PORT_SC26XX))
> > - return 0;
> > + if ((s->type != PORT_UNKNOWN) && (s->type != PORT_SC26XX))
> > + return -EINVAL;
>
> Why are you now returning a different value?
Value is not different. Patch just change logic a bit. Zero on success,
same as before.
---
next prev parent reply other threads:[~2013-05-14 16:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-14 15:59 [PATCH v2] serial: sccnxp: Improve verify_port Alexander Shiyan
2013-05-14 16:09 ` Greg Kroah-Hartman
2013-05-14 16:30 ` Alexander Shiyan [this message]
2013-05-14 16:46 ` Greg Kroah-Hartman
2013-05-14 16:58 ` Re[2]: " Alexander Shiyan
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=1368549047.374871060@f159.mail.ru \
--to=shc_work@mail.ru \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.cz \
--cc=linux-serial@vger.kernel.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