From: Christopher Curtis <ccurtis0@gmail.com>
To: Greg KH <greg@kroah.com>
Cc: Alan Cox <alan@linux.intel.com>,
linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-usb@vger.kernel.org
Subject: Re: [PATCH 1/5] tty: Add a function to insert a string of characters with the same flag
Date: Sat, 27 Feb 2010 09:45:57 -0500 [thread overview]
Message-ID: <969d87001002270645v4b958f91vee0c0868d665c06b@mail.gmail.com> (raw)
In-Reply-To: <20100226221100.GA22352@kroah.com>
On Fri, Feb 26, 2010 at 5:11 PM, Greg KH <greg@kroah.com> wrote:
>
> On Wed, Feb 17, 2010 at 01:06:30PM +0000, Alan Cox wrote:
> > The USB drivers often want to insert a series of bytes all with the same
> > flag set - provide a helper for this case.
> >
> > Signed-off-by: Alan Cox <alan@linux.intel.com>
> > ---
> >
> > drivers/char/tty_buffer.c | 12 +++++++-----
> > include/linux/tty_flip.h | 7 ++++++-
> > 2 files changed, 13 insertions(+), 6 deletions(-)
> >
> >
> > diff --git a/drivers/char/tty_buffer.c b/drivers/char/tty_buffer.c
> > index 8402eda..af8d977 100644
> > --- a/drivers/char/tty_buffer.c
> > +++ b/drivers/char/tty_buffer.c
> > @@ -231,9 +231,10 @@ int tty_buffer_request_room(struct tty_struct *tty, size_t size)
> > EXPORT_SYMBOL_GPL(tty_buffer_request_room);
> >
> > /**
> > - * tty_insert_flip_string - Add characters to the tty buffer
> > + * tty_insert_flip_string_fixed_flag - Add characters to the tty buffer
> > * @tty: tty structure
> > * @chars: characters
> > + * @flag: flag value for each character
> > * @size: size
> > *
> > * Queue a series of bytes to the tty buffering. All the characters
> > @@ -242,18 +243,19 @@ EXPORT_SYMBOL_GPL(tty_buffer_request_room);
> > * Locking: Called functions may take tty->buf.lock
> > */
> >
> > -int tty_insert_flip_string(struct tty_struct *tty, const unsigned char *chars,
> > - size_t size)
> > +int tty_insert_flip_string_fixed_flag(struct tty_struct *tty,
> > + const unsigned char *chars, char flag, size_t size)
> > {
> > int copied = 0;
> > do {
> > + int goal = min(size - copied, TTY_BUFFER_PAGE);
>
> This variable isn't used in this function.
>
> > int space = tty_buffer_request_room(tty, goal);
It is used on the next line; it would appear to be a local scope alias
for some other 'goal'...?
Chris
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2010-02-27 14:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-17 13:06 [PATCH 1/5] tty: Add a function to insert a string of characters with the same flag Alan Cox
[not found] ` <20100217130604.16008.86393.stgit-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2010-02-17 13:06 ` [PATCH 2/5] tty: Prune uses of tty_request_room in the USB layer Alan Cox
2010-02-17 13:07 ` [PATCH 5/5] tty: Fix up char drivers request_room usage Alan Cox
2010-02-17 13:06 ` [PATCH 3/5] tty: sort out the request_room handling for whiteheat Alan Cox
2010-02-17 13:07 ` [PATCH 4/5] tty: kill request_room for USB ACM class Alan Cox
2010-02-26 22:11 ` [PATCH 1/5] tty: Add a function to insert a string of characters with the same flag Greg KH
2010-02-27 14:45 ` Christopher Curtis [this message]
2010-02-27 19:02 ` Alan Cox
2010-02-27 23:37 ` Greg KH
2010-02-27 19:32 ` Alan Cox
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=969d87001002270645v4b958f91vee0c0868d665c06b@mail.gmail.com \
--to=ccurtis0@gmail.com \
--cc=alan@linux.intel.com \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=linux-usb@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;
as well as URLs for NNTP newsgroup(s).