[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131122222040.GA12800@core.coreip.homeip.net>
Date: Fri, 22 Nov 2013 14:20:42 -0800
From: Dmitry Torokhov <dmitry.torokhov@...il.com>
To: Peter Hurley <peter@...leysoftware.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jslaby@...e.cz>, linux-kernel@...r.kernel.org,
linux-serial@...r.kernel.org
Subject: Re: [PATCH tty-next 1/5] tty: Always handle NULL flag ptr
Hi Peter,
On Fri, Nov 22, 2013 at 12:09:54PM -0500, Peter Hurley wrote:
> Most line disciplines already handle the undocumented NULL flag
> ptr in their .receive_buf method; however, several don't.
>
> Document the NULL flag ptr, and correct handling in the
> N_MOUSE, N_GSM0710 and N_R394 line disciplines.
>
> Cc: Dmitry Torokhov <dmitry.torokhov@...il.com>
> Signed-off-by: Peter Hurley <peter@...leysoftware.com>
> ---
> drivers/input/serio/serport.c | 28 +++++++++++++++-------------
> drivers/tty/n_gsm.c | 5 +++--
> drivers/tty/n_r3964.c | 2 +-
> include/linux/tty_ldisc.h | 6 ++++--
> 4 files changed, 23 insertions(+), 18 deletions(-)
>
> diff --git a/drivers/input/serio/serport.c b/drivers/input/serio/serport.c
> index 8755f5f..72b4633 100644
> --- a/drivers/input/serio/serport.c
> +++ b/drivers/input/serio/serport.c
> @@ -124,7 +124,7 @@ static void serport_ldisc_receive(struct tty_struct *tty, const unsigned char *c
> {
> struct serport *serport = (struct serport*) tty->disc_data;
> unsigned long flags;
> - unsigned int ch_flags;
> + unsigned int ch_flags = TTY_NORMAL;
We should not be passing tty constants into serio layer as they are
different subsystems (even though TTY_NORMAL happens to be encoded as 0
and thus happens to work). Please use 0 for 'no flags' as the original
code did.
Other than that the serio portion looks good to me.
Thanks.
--
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists