From: Alexey Dobriyan Date: Fri, 29 Sep 2006 08:59:50 +0000 (-0700) Subject: [PATCH] tty_io.c: keep davej sane X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=527063ba985740e9cd271731c31f503f916681c9;p=openwrt%2Fstaging%2Fblogic.git [PATCH] tty_io.c: keep davej sane Just comment and next "while" look _very_ wrong. Place { correctly to hint unsuspecting ones that it's the end of the loop actually. Signed-off-by: Alexey Dobriyan Cc: Dave Jones Acked-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index bb0d9199e994..eb881cfa53e0 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c @@ -483,10 +483,9 @@ int tty_insert_flip_string(struct tty_struct *tty, const unsigned char *chars, tb->used += space; copied += space; chars += space; - } - /* 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)); + /* 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; } EXPORT_SYMBOL(tty_insert_flip_string); @@ -521,10 +520,9 @@ int tty_insert_flip_string_flags(struct tty_struct *tty, copied += space; chars += space; flags += space; - } - /* 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)); + /* 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; } EXPORT_SYMBOL(tty_insert_flip_string_flags);