All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Hurley <peter@hurleysoftware.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jslaby@suse.cz>,
	linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org
Subject: Re: [PATCH tty-next 1/5] tty: Always handle NULL flag ptr
Date: Mon, 25 Nov 2013 21:00:19 -0500	[thread overview]
Message-ID: <529400B3.4070003@hurleysoftware.com> (raw)
In-Reply-To: <20131122222040.GA12800@core.coreip.homeip.net>

On 11/22/2013 05:20 PM, Dmitry Torokhov wrote:
> 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@gmail.com>
>> Signed-off-by: Peter Hurley <peter@hurleysoftware.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.

Ah, I see your point. I'll respin this for your ack.

Regards,
Peter Hurley


  reply	other threads:[~2013-11-26  2:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-22 17:09 [PATCH tty-next 0/5] Halve tty buffer memory consumption Peter Hurley
2013-11-22 17:09 ` [PATCH tty-next 1/5] tty: Always handle NULL flag ptr Peter Hurley
2013-11-22 22:20   ` Dmitry Torokhov
2013-11-26  2:00     ` Peter Hurley [this message]
2013-12-02 18:56     ` [PATCH v2 " Peter Hurley
2013-12-02 19:09       ` Dmitry Torokhov
2013-11-22 17:09 ` [PATCH tty-next 2/5] tty: Enable configurable tty flip buffer limit Peter Hurley
2013-11-22 17:09 ` [PATCH tty-next 3/5] tty: Rename tty buffer memory_used field Peter Hurley
2013-11-22 17:09 ` [PATCH tty-next 4/5] tty: Remove tty_prepare_flip_string_flags() Peter Hurley
2013-11-22 17:09 ` [PATCH tty-next 5/5] tty: Halve flip buffer GFP_ATOMIC memory consumption Peter Hurley
2013-12-09  1:01   ` Greg Kroah-Hartman
2013-12-09 13:27     ` Peter Hurley
2013-12-09 14:23     ` [PATCH tty-next v3 " Peter Hurley

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=529400B3.4070003@hurleysoftware.com \
    --to=peter@hurleysoftware.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.