public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Jones <davej@redhat.com>
To: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: tty_io wtf.
Date: Wed, 2 Aug 2006 18:37:33 -0400	[thread overview]
Message-ID: <20060802223733.GA20485@redhat.com> (raw)
In-Reply-To: <20060802223604.GI3639@redhat.com>

On Wed, Aug 02, 2006 at 06:36:04PM -0400, Dave Jones wrote:
 > I knew I'd regret digging in the tty code.
 > Can someone enlighten me as to what this *should* be doing?
 > 
 > int tty_insert_flip_string(struct tty_struct *tty, const unsigned char *chars,
 >                 size_t size)
 > {   
 >    	.... 
 >     /* There is a small chance that we need to split the data over
 >        several buffers. If this is the case we must loop */
 >     while (unlikely(size > copied));
 >     return copied;
 > }   
 > 
 > 
 > Looping I can understand, but forever ?
 > Given we're not advancing 'copied', can we just kill that while loop?
 > Or should we be changing it with each iteration?

Disregard, it's the end of a do { } while.
I've been staring at this too long.

		Dave

-- 
http://www.codemonkey.org.uk

  reply	other threads:[~2006-08-02 22:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-02 22:36 tty_io wtf Dave Jones
2006-08-02 22:37 ` Dave Jones [this message]
2006-08-02 23:02   ` [PATCH] tty_io.c: keep davej sane Alexey Dobriyan
2006-08-03 13:12     ` Alan Cox
2006-08-02 22:51 ` tty_io wtf David Miller

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=20060802223733.GA20485@redhat.com \
    --to=davej@redhat.com \
    --cc=linux-kernel@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