aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2006-09-29 04:59:50 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-29 12:18:10 -0400
commit527063ba985740e9cd271731c31f503f916681c9 (patch)
treedb8ecc8ac45c432887bc1a7c623625db714c5354 /drivers
parent3bc1fa8ae18f281b40903cce94baba10c3cf9d88 (diff)
[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 <adobriyan@gmail.com> Cc: Dave Jones <davej@redhat.com> Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/tty_io.c14
1 files changed, 6 insertions, 8 deletions
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,
483 tb->used += space; 483 tb->used += space;
484 copied += space; 484 copied += space;
485 chars += space; 485 chars += space;
486 } 486 /* There is a small chance that we need to split the data over
487 /* There is a small chance that we need to split the data over 487 several buffers. If this is the case we must loop */
488 several buffers. If this is the case we must loop */ 488 } while (unlikely(size > copied));
489 while (unlikely(size > copied));
490 return copied; 489 return copied;
491} 490}
492EXPORT_SYMBOL(tty_insert_flip_string); 491EXPORT_SYMBOL(tty_insert_flip_string);
@@ -521,10 +520,9 @@ int tty_insert_flip_string_flags(struct tty_struct *tty,
521 copied += space; 520 copied += space;
522 chars += space; 521 chars += space;
523 flags += space; 522 flags += space;
524 } 523 /* There is a small chance that we need to split the data over
525 /* There is a small chance that we need to split the data over 524 several buffers. If this is the case we must loop */
526 several buffers. If this is the case we must loop */ 525 } while (unlikely(size > copied));
527 while (unlikely(size > copied));
528 return copied; 526 return copied;
529} 527}
530EXPORT_SYMBOL(tty_insert_flip_string_flags); 528EXPORT_SYMBOL(tty_insert_flip_string_flags);